Method To sort an array of 1's and 0's in O(n) time and O(1) space