← Amazon questions

Find value K in given complete binary tree and count nodes

Filed under Amazon

Given a complete binary tree where nodes are indexed 1 to N, find the value at index k in O(logN) time and determine the total number of nodes N in the tree using an optimized approach.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.