Trees Important Questions
Important points :
- Searching in a tree
- Left, Right, Top, Bottom view of a binary tree
- Depth/Height of a tree (Many questions are based on this (I got two questions in two different company’s interviews based on this)).
- Preorder, Postorder, Inorder Traversal (You’ll end up using one for pretty much every tree question(I used preorder))
Easy/Medium (MUST DO)
- https://leetcode.com/problems/binary-tree-inorder-traversal/
- https://leetcode.com/problems/same-tree/
- https://leetcode.com/problems/symmetric-tree/
- https://leetcode.com/problems/maximum-depth-of-binary-tree/ (IMPORTANT)
- https://leetcode.com/problems/invert-binary-tree/
- https://leetcode.com/problems/path-sum/ (IMPORTANT)
- https://leetcode.com/problems/binary-tree-level-order-traversal/ (Good Question get asked frequently)
- https://leetcode.com/problems/count-complete-tree-nodes/
- https://leetcode.com/problems/balanced-binary-tree/
- https://leetcode.com/problems/diameter-of-binary-tree/
- https://www.interviewbit.com/problems/populate-next-right-pointers-tree/ (IMPORTANT)
- https://www.interviewbit.com/problems/construct-binary-tree-from-inorder-and-preorder/
- https://www.interviewbit.com/problems/sorted-array-to-balanced-bst/ (IMPORTANT)