Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 22nd, 2012  |  syntax: Java  |  size: 0.25 KB  |  views: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  public T inOrder(BSTNode node, int steps) {
  2.                    
  3.                    if (steps == 0) {
  4.                            return node.data;
  5.                    } else if (node != null && steps != 0) {
  6.                            inOrder(node.left, steps--);
  7.                            inOrder(node.right, steps--);
  8.                    }
  9.                 return null;
  10.            }