As reported: Capital One online assessment, May 2025: four questions in 70 minutes — a bird picking up sticks alternately from the right and the left, popping colored cells in a matrix, and painting slots while counting same-color neighbours.
forest[i] is the length of the stick at position i, or 0 if there is none. The bird starts at index bird (where forest[bird] = 0). It repeatedly flies to the nearest stick on one side, takes it (the position becomes empty) and brings it back to its starting position, alternating directions and starting with the right. It stops as soon as the total length of collected sticks is at least 100. Return the indices of the sticks in the order they were picked.
Example
forest = [25,0,50,0,0,0,0,15,0,0,45], bird = 4 -> [7,2,10]
right: index 7 (15), left: index 2 (50), right: index 10 (45) -> total 110
forest = [60,0,0,50], bird = 1 -> [3,0]
Constraints: 3 ≤ forest.length ≤ 10^5; 0 ≤ forest[i] ≤ 100; forest[bird] = 0. The input guarantees the total reaches 100 before the bird ever flies to a side that has no sticks left.
Code runner format: line 1 forest, line 2 bird. Implement collectSticks(forest, bird); the harness prints the list of indices.