Problems
Callback's own problems and the LeetCode questions companies have been asking, in one place — pick a category, then filter by company, frequency, status, difficulty, topic, and language.
- Binary Tree171
- Array1842
- String778
- Hash Table749
- Math565
- Dynamic Programming534
- Sorting483
- Greedy401
- Depth-First Search338
- Binary Search305
- Matrix267
- Breadth-First Search261
Algorithms & Data Structures · Build in-order and pull values off a forward-only iterator — no middle-finding, no array copy.
Pre-Order Traversal Skipping Marked Nodes
Algorithms & Data Structures · A pre-order walk with a stack; a marked node is dropped before its children are pushed, so its whole subtree disappears.
Rewrite Two Complete Trees With Subtree Sums
Algorithms & Data Structures · In array form the children of i are 2i + 1 and 2i + 2, so merge by index and accumulate sums from the last index down.
Boundary of a Full Binary Tree
Algorithms & Data Structures · With no missing children the two edges are plain spines: walk them and the leaves separately, and count the corners once.
Binary Tree Maximum Path Sum, With the Path
Algorithms & Data Structures · The maximum path sum is the warm-up; the follow-up wants the nodes on the path, which means recording which arm each node extends and stitching two arms together at the best bend.
Asked on LeetCode
166 questions tagged Binary Tree · all time
- Binary Tree Maximum Path SumhardDynamic ProgrammingTreeDepth-First SearchBinary Tree+117 companies
- Lowest Common Ancestor of a Binary TreemediumTreeDepth-First SearchBinary TreeBinary Lifting+114 companies
- Serialize and Deserialize Binary TreehardStringTreeDepth-First SearchBreadth-First Search+214 companies
- Validate Binary Search TreemediumTreeDepth-First SearchBinary Search TreeBinary Tree13 companies
- Binary Tree Zigzag Level Order TraversalmediumTreeBreadth-First SearchBinary Tree13 companies
- All Nodes Distance K in Binary TreemediumHash TableTreeDepth-First SearchBreadth-First Search+112 companies
- Diameter of Binary TreeeasyTreeDepth-First SearchBinary TreeDP on Trees12 companies
- Maximum Depth of Binary TreeeasyTreeDepth-First SearchBreadth-First SearchBinary Tree11 companies
- Lowest Common Ancestor of a Binary Tree IIImediumHash TableTwo PointersTreeBinary Tree+210 companies
- Binary Tree Right Side ViewmediumTreeDepth-First SearchBreadth-First SearchBinary Tree10 companies
- Vertical Order Traversal of a Binary TreehardHash TableTreeDepth-First SearchBreadth-First Search+210 companies
- House Robber IIImediumDynamic ProgrammingTreeDepth-First SearchBinary Tree+110 companies
- Binary Tree Level Order TraversalmediumTreeBreadth-First SearchBinary Tree10 companies
- Binary Tree CamerashardDynamic ProgrammingTreeDepth-First SearchBinary Tree+19 companies
- Binary Tree Vertical Order TraversalmediumHash TableTreeDepth-First SearchBreadth-First Search+29 companies
- Kth Largest Element in a StreameasyTreeDesignBinary Search TreeHeap (Priority Queue)+29 companies
- Kth Smallest Element in a BSTmediumTreeDepth-First SearchBinary Search TreeBinary Tree9 companies
- Path Sum IIImediumTreeDepth-First SearchBinary Tree9 companies
- Symmetric TreeeasyTreeDepth-First SearchBreadth-First SearchBinary Tree9 companies
- Construct Binary Tree from Preorder and Inorder TraversalmediumArrayHash TableDivide and ConquerTree+19 companies
- Delete Node in a BSTmediumTreeBinary Search TreeBinary Tree9 companies
- Amount of Time for Binary Tree to Be InfectedmediumHash TableTreeDepth-First SearchBreadth-First Search+19 companies
- Path SumeasyTreeDepth-First SearchBreadth-First SearchBinary Tree9 companies
- Lowest Common Ancestor of a Binary Search TreemediumTreeDepth-First SearchBinary Search TreeBinary Tree+28 companies
- Convert Sorted Array to Binary Search TreeeasyArrayDivide and ConquerTreeBinary Search Tree+18 companies
- Boundary of Binary TreemediumTreeDepth-First SearchBinary Tree8 companies
- Maximum Width of Binary TreemediumTreeDepth-First SearchBreadth-First SearchBinary Tree8 companies
- Same TreeeasyTreeDepth-First SearchBreadth-First SearchBinary Tree8 companies
- Create Binary Tree From DescriptionsmediumArrayHash TableTreeBinary Tree8 companies
- Construct Binary Tree from Preorder and Postorder TraversalmediumArrayHash TableDivide and ConquerTree+18 companies
- Subtree of Another TreeeasyTreeDepth-First SearchString MatchingBinary Tree+17 companies
- Unique Binary Search TreesmediumMathDynamic ProgrammingTreeBinary Search Tree+17 companies
- Merge Two Binary TreeseasyTreeDepth-First SearchBreadth-First SearchBinary Tree7 companies
- Binary Search Tree IteratormediumStackTreeDesignBinary Search Tree+27 companies
- Insert into a Binary Search TreemediumTreeBinary Search TreeBinary Tree7 companies
- Balanced Binary TreeeasyTreeDepth-First SearchBinary Tree7 companies
- Binary Tree Inorder TraversaleasyStackTreeDepth-First SearchBinary Tree7 companies
- Populating Next Right Pointers in Each Node IImediumLinked ListTreeDepth-First SearchBreadth-First Search+17 companies
- Find Largest Value in Each Tree RowmediumTreeDepth-First SearchBreadth-First SearchBinary Tree7 companies
- Invert Binary TreeeasyTreeDepth-First SearchBreadth-First SearchBinary Tree7 companies
- Recover Binary Search TreemediumTreeDepth-First SearchBinary Search TreeBinary Tree7 companies
- Construct Binary Tree from Inorder and Postorder TraversalmediumArrayHash TableDivide and ConquerTree+17 companies
- Two Sum IV - Input is a BSTeasyHash TableTwo PointersTreeDepth-First Search+37 companies
- Path Sum IImediumBacktrackingTreeDepth-First SearchBinary Tree7 companies
- Find Duplicate SubtreesmediumHash TableTreeDepth-First SearchBinary Tree7 companies
- Convert Sorted List to Binary Search TreemediumLinked ListDivide and ConquerTreeBinary Search Tree+17 companies
- Step-By-Step Directions From a Binary Tree Node to AnothermediumStringTreeDepth-First SearchBinary Tree+26 companies
- Closest Binary Search Tree ValueeasyBinary SearchTreeDepth-First SearchBinary Search Tree+16 companies
- Sum of Left LeaveseasyTreeDepth-First SearchBreadth-First SearchBinary Tree6 companies
- Recover a Tree From Preorder TraversalhardStringTreeDepth-First SearchBinary Tree6 companies
Listings only — titles, difficulty, and tags link out to LeetCode. Imported from the leetcode-company-wise-problems snapshot dated 1 June 2025. Frequency is that dataset's own relative score within a company and time range.