i coded using start and end pointers traversing in off dirn…plz check…no test case passed
Start end pointers
look at your approach once again
it is not correct it will also change the relative order of other numbers
because you are swaping the element
else if(arr[s]==0)
{
swap(s,e,arr);
}
you just have to put all zeroes at end without changing the relative ordering of other element