Input = {0, 0, 1, 0, 1, 0, 0, 1, 1, 1}
Output = {0, 0, 0, 0, 0, 1, 1, 1, 1, 1}
How to solve
-------------
Swapping elements.
This program uses two pointers (left and right) to
traverse the array from both ends, swapping odd
and even numbers when found.
Time complexity: O(n)
Space Complexity:O(1)