There are two different questions hiding in "when do I use a tree?". One is about designing a program: when should your data *live* in a tree? The other is about interviews: the tree is given — which way should you *walk* it? This lesson answers both.
Free account
Sign up to read the rest of this lesson: 3 more sections, 1 drawing, a dry-run simulator and code in JavaScript, Python, Java and C++.
Still to come