Stable Array Or Not
CodeChefOpen on judge ↗
Arya Stark is interested in playing with numbers. So, now She is testing the array is Stable or Not. An array is said to be stable if it satisfy the following codition. Take an Example Case i: array a = [4,1,2,3,4,3,4,3,1,3] . In this array - 1 repeats 2 times - 2 repeats 1 times - 3 repeats 4 times - 4 repeats 3 times In the above given example the value 1 repeats twice (2 times) so here the
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