Algorithm · Salesforce · Hard
You are given $$n$$ processes, numbered $$1$$ through $$n$$, where $$n$$ is a power of two. Exactly $$k$$ of them are designated as critical; their 1‑based indices are provided in the array critical, and all values in critical are distinct. The operating system scheduler processes a contiguous block of processes. If the block has an even length greater than one, the scheduler may split it into two equal halves and assign each half to a separate processor. Otherwise, the…
Checking your access…