9 binary tree interview questions, asked at Meta, Google, Snowflake and 1 more company. Last asked Aug 2026.
+1
Minimum root-to-leaf path sumCodingGiven the root of a binary tree whose nodes hold integers (values may be negative), find the root-to-leaf path with the smallest sum. A leaf is a node with no children. A…
Last asked Aug 2026
Check completeness of a binary treeCodingGiven the root of a binary tree, return whether it is complete: every level is full except possibly the last, and the nodes on the last level sit as far left as possible. Explain…
Last asked Dec 2025
Longest increasing downward path in a binary treeCodingIn a binary tree, find the longest path that goes from a node down to one of its descendants where every child's value is greater than its parent's (not necessarily by exactly…
Last asked Nov 2025
Check that each tree node equals its subtree's averageCodingFor a binary tree, decide whether every node's value equals the average of the values in its subtree (or of the nodes below it, as the interviewer defines it), or count the nodes…
Last asked Sep 2025
Binary tree level order traversalCodingReturn a binary tree's values level by level, each level from left to right, using a queue. Be ready to print each level on its own line or to number the nodes in that order.
Last asked Sep 2025
Flatten a binary tree to a linked listCodingFlatten a binary tree in place into a chain that follows pre-order, using the right pointers as next and setting every left pointer to null.
Last asked Aug 2025
Check whether a binary tree is a max-heapCodingDecide whether a binary tree is a valid max-heap: it must be complete (checked level by level) and every node must be at least as large as its children.
Last asked Jul 2025
Maximum path sum between two leaves of a binary treeCodingYou are given the root of a binary tree. Every node stores an integer, which may be negative. A leaf is a node with no children. A leaf-to-leaf path starts at one leaf, moves…
Merge neighbor sums from many binary trees into the lastCodingYou are given a list trees of binary trees (each given by its root, possibly empty). The neighbor sum of a node is its own value plus the values of its left and right children…