Skip to content

Instantly share code, notes, and snippets.

@Alexey-N-Chernyshov
Created October 28, 2015 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Alexey-N-Chernyshov/675b478e83a63e2d3143 to your computer and use it in GitHub Desktop.
Save Alexey-N-Chernyshov/675b478e83a63e2d3143 to your computer and use it in GitHub Desktop.
//the third line for search
inStr = in.nextLine().trim().split(" ");
for (String str : inStr) {
if (!str.isEmpty()) {
AVLTree.Node node = tree.find(Integer.parseInt(str)).right;
out.print((node == null ? "null" : node.value) + " ");
System.out.print((node == null ? "null" : node.value) + " ");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment