If we have an array like [1,0,0,5,3,0] ,how to set the zeros at the end of the array and non zeros on the front of the array but not change the order of non zeros numbers like,the output would be [1,5,3,0,0,0].
I want that to write a code that arrange the non zeros at the end of the array and al non zeros at the front of the array without changing their order.
I hope I can get the answer with code and all others can get help from this.
New contributor
Muhammad Danish Hassan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3