I am getting wrong answer ,can u tell me failed test cases my code is at:
Sorting in linear time 1
-
What if there is no 0 in the sequence and the first element is 2 and second element is 1.
Run it for:
5
2
1
2
1
2 -
What if all the inputs are 0.
run:
5
0
0
0
0
0
I am attaching my code, but open it only if you want to see a different approach for this problem.(It is running a different logic.)
Feel free to ask your doubts related to your code.
If all the test cases are passing now, then give a like.

Sir,though I passed the test cases but can you tell me the drawback of using this method,my code is at: the ab
Drawback?
There is no drawback.
That’s a way of doing the question, satisfying all the constraints.
BTW would you please be more descriptive about your question?