← Questions

House robber IV: smallest possible maximum over k non-adjacent picks

0
MicrosoftCodingLast asked Nov 2026

A coding interview question asked in Microsoft's HackerRank assessment, last asked Nov 2026. It tests binary-search, greedy and dynamic programming.

A row of houses lines a street, and nums[i] is the money in house i. A robber takes at least k houses and never two neighbours: any two chosen indices differ by at least 2.

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

What it tests

binary-search · greedy · dynamic programming

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