Siyara and Queries
CodeChefOpen on judge ↗
Siyara is given an integer array N. Her friend Vatsal gives her 3 types of queries as follows: - Type 1: 1 M To add a number M in the array at any position - Type 2: 2 M To delete all occurrences of M from the array. If it is not possible, then ignore the query. - Type 3: 3 0 Display the sum of the greatest and second greatest number (other than the greatest) from the array. If not possible, pr
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.
Sign in to chat with the tutor and save your progress.
Sign in to start