You are viewing a single comment's thread. Return to all comments →
My Java solution with linear time complexity and o(h) space complexity:
public static void inOrder(Node root) { if(root == null) return; inOrder(root.left); System.out.print(root.data + " "); inOrder(root.right); }
Seems like cookies are disabled on this browser, please enable them to open this website
Tree: Inorder Traversal
You are viewing a single comment's thread. Return to all comments →
My Java solution with linear time complexity and o(h) space complexity: