Meta interview question

Binary tree search and stack management