Skip to content

Binary Tree problems,
and the tell.

Each node has at most two children, and the question is about traversal order, depth or structure. 103 problems in the catalogue carry this tag, from first-week easy to interview hard.

Free to start. Running and submitting a solution never costs credits.

How the pattern actually works.

One mechanism, and the mistake that costs people the problem.

The tell. Each node has at most two children, and the question is about traversal order, depth or structure.

The mechanism. Pre, in and post order are the same walk with the node written at a different moment, and level order is a queue. Inorder on a binary search tree comes out sorted, which answers a lot of questions on its own.

What goes wrong. Assuming a binary tree is balanced. A sorted insert makes it a linked list and every operation goes linear.

The ones asked most often.

By how often the catalogue records them being set, not by our opinion.

  1. Binary Tree CamerasHardasked at 8 companies
  2. Create Binary Tree From DescriptionsMediumasked at 2 companies
  3. Count Nodes Equal to Average of SubtreeMediumasked at 2 companies
  4. Path Sum IVMediumasked at 1 companies
  5. Cycle Length Queries in a TreeHardasked at 1 companies
  6. Minimum Number of Operations to Sort a Binary Tree by LevelMediumasked at 1 companies
  7. Binary Tree PruningMediumasked at 1 companies
  8. Binary Tree TiltEasyasked at 1 companies
  9. Subtree Removal Game with Fibonacci TreeHardasked at 1 companies
  10. Linked List in Binary TreeMediumasked at 1 companies

Read it, watch it, then solve it.

The order that makes a pattern stick.

Everything in the app, in one place.

Practice, interviews and the tools, all free to start. Swipe to see the rest.

Free to start: 100 AI credits when you sign up and 100 every month. Start free in the app

About binary tree problems.

Free to start, no card.

Start practising
How do I know a problem is a binary tree problem?

Each node has at most two children, and the question is about traversal order, depth or structure.

How many binary tree problems should I solve?

Enough to stop needing the hint, which is usually ten to fifteen across the levels, not the whole list. The catalogue tags 103, split roughly 26 easy, 67 medium and 10 hard in the sample we show, so work up rather than across.

What goes wrong most often in binary tree problems?

Assuming a binary tree is balanced. A sorted insert makes it a linked list and every operation goes linear.

Is practising by pattern better than a problem sheet?

A sheet tells you what to solve. A pattern tells you why those problems sit together, which is the part that carries over to the problem you have not seen. That is why the app files every problem under its pattern.