A complete binary tree has its nodes numbered 1, 2, 3, ... in level order (the children of node i are 2i and 2i+1). Given the root and a key k, decide whether the node numbered k exists in the tree…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.