private Node successor(Stack<Node> stack, Node current) {
        if (current == null) {
            return null;
        }
        if (current.right != null) {
            stack.push(current);
            current = current.right;
            while (current.left != null) {
                stack.push(current);
                current = current.left;
            }
            return current;
        } else {
            while (!stack.isEmpty() && stack.peek().right == current) {
                current = stack.pop();
            }
            if (stack.isEmpty()) {
                return null;
            } else {
                return stack.pop();
            }
        }
    }
Date 10/08/2016
@author Tushar Roy

Given a non-empty binary search tree and a target value, find k values in the BST that are closest to the target.

Time complexity O(log(n) + k)

https://leetcode.com/problems/closest-binary-search-tree-value-ii/
src/com/interview/tree/KClosestValueInBinaryTree.java