← Questions
House robber IV: smallest possible maximum over k non-adjacent picks
0
I was asked this
No reports yet. Sign in to say where you were asked it.
A row of houses (or servers) each holds a value. Choose at least k of them with no two next to each other. Among all valid choices, make the largest chosen value as small as possible and return it. Explain the binary search on the answer with a greedy check, and why the greedy pick is safe.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
