Vrbo Interview Question

The first one is search a key in a binary tree (so easy). The second one is beautiful subarray.