← back

Binary Tree

130 questions · 0 seen

All Binary Tree problems

Problems

94 Binary Tree Inorder Traversal
95 Unique Binary Search Trees II
96 Unique Binary Search Trees
98 Validate Binary Search Tree
99 Recover Binary Search Tree
100 Same Tree
101 Symmetric Tree
102 Binary Tree Level Order Traversal
103 Binary Tree Zigzag Level Order Traversal
104 Maximum Depth of Binary Tree
105 Construct Binary Tree from Preorder and Inorder Traversal
106 Construct Binary Tree from Inorder and Postorder Traversal
107 Binary Tree Level Order Traversal II
108 Convert Sorted Array to Binary Search Tree
109 Convert Sorted List to Binary Search Tree
110 Balanced Binary Tree
111 Minimum Depth of Binary Tree
112 Path Sum
113 Path Sum II
114 Flatten Binary Tree to Linked List
116 Populating Next Right Pointers in Each Node
117 Populating Next Right Pointers in Each Node II
124 Binary Tree Maximum Path Sum
129 Sum Root to Leaf Numbers
144 Binary Tree Preorder Traversal
145 Binary Tree Postorder Traversal
173 Binary Search Tree Iterator
199 Binary Tree Right Side View
222 Count Complete Tree Nodes
226 Invert Binary Tree
230 Kth Smallest Element in a BST
235 Lowest Common Ancestor of a Binary Search Tree
236 Lowest Common Ancestor of a Binary Tree
257 Binary Tree Paths
297 Serialize and Deserialize Binary Tree
331 Verify Preorder Serialization of a Binary Tree
337 House Robber III
404 Sum of Left Leaves
437 Path Sum III
449 Serialize and Deserialize BST
450 Delete Node in a BST
501 Find Mode in Binary Search Tree
508 Most Frequent Subtree Sum
513 Find Bottom Left Tree Value
515 Find Largest Value in Each Tree Row
530 Minimum Absolute Difference in BST
538 Convert BST to Greater Tree
543 Diameter of Binary Tree
563 Binary Tree Tilt
572 Subtree of Another Tree
606 Construct String from Binary Tree
617 Merge Two Binary Trees
623 Add One Row to Tree
637 Average of Levels in Binary Tree
652 Find Duplicate Subtrees
653 Two Sum IV - Input is a BST
654 Maximum Binary Tree
655 Print Binary Tree
662 Maximum Width of Binary Tree
669 Trim a Binary Search Tree
671 Second Minimum Node In a Binary Tree
687 Longest Univalue Path
700 Search in a Binary Search Tree
701 Insert into a Binary Search Tree
703 Kth Largest Element in a Stream
783 Minimum Distance Between BST Nodes
814 Binary Tree Pruning
863 All Nodes Distance K in Binary Tree
865 Smallest Subtree with all the Deepest Nodes
872 Leaf-Similar Trees
889 Construct Binary Tree from Preorder and Postorder Traversal
894 All Possible Full Binary Trees
897 Increasing Order Search Tree
919 Complete Binary Tree Inserter
938 Range Sum of BST
951 Flip Equivalent Binary Trees
958 Check Completeness of a Binary Tree
965 Univalued Binary Tree
968 Binary Tree Cameras
971 Flip Binary Tree To Match Preorder Traversal
979 Distribute Coins in Binary Tree
987 Vertical Order Traversal of a Binary Tree
988 Smallest String Starting From Leaf
993 Cousins in Binary Tree
998 Maximum Binary Tree II
1008 Construct Binary Search Tree from Preorder Traversal
1022 Sum of Root To Leaf Binary Numbers
1026 Maximum Difference Between Node and Ancestor
1028 Recover a Tree From Preorder Traversal
1038 Binary Search Tree to Greater Sum Tree
1080 Insufficient Nodes in Root to Leaf Paths
1104 Path In Zigzag Labelled Binary Tree
1110 Delete Nodes And Return Forest
1123 Lowest Common Ancestor of Deepest Leaves
1145 Binary Tree Coloring Game
1161 Maximum Level Sum of a Binary Tree
1261 Find Elements in a Contaminated Binary Tree
1302 Deepest Leaves Sum
1305 All Elements in Two Binary Search Trees
1315 Sum of Nodes with Even-Valued Grandparent
1325 Delete Leaves With a Given Value
1339 Maximum Product of Splitted Binary Tree
1361 Validate Binary Tree Nodes
1367 Linked List in Binary Tree
1372 Longest ZigZag Path in a Binary Tree
1373 Maximum Sum BST in Binary Tree
1379 Find a Corresponding Node of a Binary Tree in a Clone of That Tree
1382 Balance a Binary Search Tree
1448 Count Good Nodes in Binary Tree
1457 Pseudo-Palindromic Paths in a Binary Tree
1530 Number of Good Leaf Nodes Pairs (PRO)
1569 Number of Ways to Reorder Array to Get Same BST
1609 Even Odd Tree
1932 Merge BSTs to Create Single BST
2049 Count Nodes With the Highest Score
2096 Step-By-Step Directions From a Binary Tree Node to Another
2196 Create Binary Tree From Descriptions
2236 Root Equals Sum of Children
2265 Count Nodes Equal to Average of Subtree
2331 Evaluate Boolean Binary Tree
2385 Amount of Time for Binary Tree to Be Infected
2415 Reverse Odd Levels of Binary Tree
2458 Height of Binary Tree After Subtree Removal Queries
2471 Minimum Number of Operations to Sort a Binary Tree by Level
2476 Closest Nodes Queries in a Binary Search Tree
2509 Cycle Length Queries in a Tree
2583 Kth Largest Sum in a Binary Tree
2641 Cousins in Binary Tree II
2673 Make Costs of Paths Equal in a Binary Tree
3319 K-th Largest Perfect Subtree Size in Binary Tree