As reported: D. E. Shaw SMTS round 1 (DSA / trees, 2026): find a specific node in a tree whose values are sorted level by level; the number of nodes is given, and the expectation was a binary search directly on the tree, using complete-tree properties in the spirit of LeetCode 222 — Count Complete Tree Nodes.
You are given the root of a complete binary tree with n nodes (every level full except possibly the last, which is filled from the left). Reading the values in level order (top to bottom, left to right) gives a strictly increasing sequence.
For each value in targets, return the level-order position (1-based) of the node holding it, or -1 if no node holds it.
Example 1
root = [1,3,5,7,9,11], n = 6, targets = [7,4,1,11]
Output: [4,-1,1,6]
Example 2
root = [10,20,30], n = 3, targets = [30,10,25]
Output: [3,1,-1]
Constraints: 1 ≤ n ≤ 10^5; values are distinct integers in [1, 10^9], increasing in level order; 1 ≤ targets.length ≤ 10^5.
Code runner format: one JSON value per line: root as a level-order array, n, targets. Implement findPositions(root, n, targets). Do not copy the tree into an array — answer each query by walking the tree.