Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Pre Order Traversal implementation on the SSaurel's Channel
// Root, Left, Right
public static <T> void preOrderTraverse(Node<T> node) {
if (node == null)
return;
System.out.print(node.data + " ");
preOrderTraverse(node.left);
preOrderTraverse(node.right);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.