Unity in Zeros
In this program you are given with an array with 0's as elements in between the non zero elements, now you have to sort the array in such way that non zero elements should not loose the sequence whereas zeros should be in the last.
Alternative Method. Input:
5 ---Array size
1
2
0
3
0
Output:
1
2
3
0
0
Alternative Method. Input:
5 ---Array size
1
2
0
3
0
Output:
1
2
3
0
0
Comments
Post a Comment