← Questions

Minimum cost to process a task range by halving, with priority tasks

0
MicrosoftCodingLast asked Nov 2026

A coding interview question asked in Microsoft's HackerRank assessment, last asked Nov 2026. It tests divide and conquer, recursion and binary-search.

A CPU has tasks 1..n to process, and some of them are marked as priority tasks. It starts with all n tasks as one contiguous group.

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

divide and conquer · recursion · binary-search

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