Sulba
ReviewSign inAccount
Theme
Editor theme
Light
Dark

Intermediate · Coding interviews: lists, trees and graphs

Binary trees

Six interview problems on binary trees: reading one level by level, its diameter, the lowest common ancestor of two nodes, writing a tree down and reading it back, the paths that add up to a target and the largest path sum.

You build
levels.py, then diameter.py, then ancestor.py, then codec.py, then paths.py, then path_sum.py
Stages
6 Problems
Time
About 2.5 hours

Loading the workspace…