Hello Mate,
Let's discuss problem statement.
We have an array with 0 and 1 we just have to sort given array without using space.
Input: [1,0,0,1,1,1,0,0,1,1]
Output: [
0, 0, 0, 0, 1,
1, 1, 1, 1, 1
]
You can find code : https://gist.github.com/kewal28/a7b07...