← All problemsSign in

Nice Array

Tom is a very bright student. He is in IV standard and already started competitive programming. Since last year 2020 was full of ups and downs! He has a new year resolution “FOCUS ON LEARNING, NOT JUST GRADES” , so he started practicing on new algorithms. There is one algorithm to convert a given Array into a Nice Array. He has an Initial Array --> a1,a2,…,an, here for all i ( 1<=i<=n ) a[i] is n

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