← All problemsSign in

Is it Sorted or Not, That is the Question

CodeChefRating 2429Open on judge ↗

Gru has come to Minionland to recruit some minions for his next robbery. There are $N$ minions available for recruitment and each minion has a skill value associated with it. These skill values are given in the array $A$. Gru needs to recruit exactly $K$ minions for his next assignment. Now, Gru will pick the minions one by one in some random order. An already picked minion cannot be picked aga

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start