

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 8
click for more info
Not enough gems
Cost: 6 gems
1: Trees
incomplete
2: Binary Trees
incomplete
3: Insert Nodes
incomplete
4: Insert Review
incomplete
5: Min and Max
incomplete
6: Delete
incomplete
7: Deletion Review
incomplete
8: Preorder Traversal
incomplete
9: Postorder Traversal
incomplete
10: Inorder Traversal
incomplete
11: Node Exists
incomplete
12: Height
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
On LockedIn, it's common for one user to navigate directly to another user's profile. We even creepily give the stalked user a notification that someone is looking at their profile.
To make this feature work, we need to be able to quickly check if a user exists in our tree.
Complete the exists method.
It should take a value as input and return True if the value exists in the tree, and False if it doesn't. It's a recursive method, as you probably guessed.