Fix printTreepre (#3218)

This commit is contained in:
Zohaib Hussain
2022-08-18 22:40:20 +05:00
committed by GitHub
parent 3f69603440
commit 12a4e27213

View File

@ -39,8 +39,8 @@ public class RedBlackBST {
} }
System.out.print( System.out.print(
((node.color == R) ? " R " : " B ") + "Key: " + node.key + " Parent: " + node.p.key + "\n"); ((node.color == R) ? " R " : " B ") + "Key: " + node.key + " Parent: " + node.p.key + "\n");
printTree(node.left); printTreepre(node.left);
printTree(node.right); printTreepre(node.right);
} }
private Node findNode(Node findNode, Node node) { private Node findNode(Node findNode, Node node) {