Search in a Binary Search Tree

Easy · Binary Search Trees · about 10 minutes

Asked at Amazon, Apple, Microsoft.

Look up val in a binary search tree. If a node holds that value, return that node (with everything below it); if no node does, return null.

Related guides