← Questions

Count the maximum in each queried suffix

0
Microsoft AIMicrosoftCodingLast asked Oct 2026

A coding interview question asked in Microsoft AI's coding round and at Microsoft, last asked Oct 2026. It tests arrays, prefix sums and queries.

You are given an integer array nums of length n and an array query of 0-based start indices. For each index i in query, look at the suffix nums[i], nums[i+1], ..., nums[n-1].

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

  • Microsoft AI · Coding · Last asked Oct 2026Live coding
  • Microsoft · Coding · Last asked Aug 202660 min · Ten to fifteen minutes of behavioral questions, then coding in HackerRank where you write a main and make the tests pass; usually three rounds · No AI unless the interviewer invites it; some 2026 loops add a round where you bring your own AI agent

What it tests

arrays · prefix sums · queries

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