Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Friday, Dec 4.Claim the deal

You are implementing a simplified decoding step for a language model. At each time step, the model produces scores for several candidate tokens, and greedy sampling selects the highest-scoring token at every time step independently, without considering any other time step.

Given scores, where scores[i][j] is the score for token j at time step i, return a sequence containing the index of the highest-scoring token at each time step. If two tokens tie for the highest score at the same time step, choose the smaller token index.

Test Cases
Input
Output
Expected