We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Node Exists

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.

Assignment

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.