← All problemsSign in

Extract Minimum

Problem Description: You are given n integers. You have to delete minimum number of elements so that the remaining elements satisfy the property a Input: First Line: contains number of integers n. Second Line: contains n space seprated integers ai. Output: - Print one integer, the minimum number of elements that will have to removed. Constraints: - 1 n 10^5 - 1 a[i] 10^5 Example Input:

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