Rearrange a given array so that
O(1) extra space.
Input : [1, 0] Return : [0, 1]
size of the array. Then, following holds true :
- All elements in the array are in the range
N * Ndoes not overflow for a signed integer
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.