← Questions

Group piano notes into hand positions and assign fingers

0
GoogleCodingLast asked Nov 2026

A coding interview question asked in Google's first round (coding), last asked Nov 2026. It tests arrays, greedy and simulation.

A melody is a list of integer notes played in order with one hand; neighbouring integers are neighbouring keys. A hand position covers five neighbouring keys, so one position can play a run of consecutive notes only while the highest and…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Google · First round: coding · Last asked Nov 202645 min · Coding in a Google Doc, no syntax highlighting or autocomplete · No AI

What it tests

arrays · greedy · simulation

Your code and the AI tutor open when you unlock this question.