Created
October 28, 2015 19:43
-
-
Save Alexey-N-Chernyshov/569e4141ed3f3249329e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//the second line for search | |
inStr = in.nextLine().trim().split(" "); | |
for (String str : inStr) { | |
if (!str.isEmpty()) { | |
RBTree.Node node = tree.find(Integer.parseInt(str)); | |
node = node == null ? null : node.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