As reported: Tower Research Capital SDE-1 online assessment for 2026 graduates:
Nsequential nodes of a low-latency trading pipeline, nodeiholdingA[i]latency tokens; Alex and Blake alternate (Alex first); a move takes one token from a nodeiand adds it to a nodej > i; a player with no valid move loses; both play optimally — determine the winner.
A pipeline has n nodes in a row, numbered 1..n from left to right. Node i holds A[i] tokens.
Alex and Blake play in turns, Alex first. A move: choose nodes i < j such that node i has at least one token, remove one token from node i and add it to node j. A player who has no valid move loses. Both play optimally.
Return "Alex" or "Blake" — the winner.
Example 1
A = [1,0,0,0]
Output: "Alex"
Alex moves the token straight to node 4; Blake has no move.
Example 2
A = [2,0,0,0]
Output: "Blake"
Whatever Alex does with one token, Blake mirrors it with the other.
Example 3
A = [1,1,0]
Output: "Alex"
Constraints: 1 ≤ n ≤ 2 · 10^5; 0 ≤ A[i] ≤ 10^9.
Code runner format: one JSON value per line: A. Implement winner(A).