Challenge: Find Node

Let’s find a particular node in a BST.

Problem

Find the node with the given value.

Input

A BST and an integer value.

Output

Returns true if the given value is present, false otherwise.

Sample input

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.