Marks :10
: 8 | : 0
Given an array of n elements containing zero and non zero elements. Output and array with all the zero's moved to the end while maintaining the relative ordering of the non zero elements.
The first line contains and integer n representing the number of elements in the array. The next line contains n space separated integers which denote the elements of the array
Output n space separated integers which have all the zeros moved to the end while maintaining the relative ordering of the other elements.
7 12 0 5 0 34 3 0
12 5 34 3 0 0 0
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.