A binary list is given containing " 0 and 1 " . I've have to sort the list as [0,0,00,0,00,0,0,1,1,1,11,1,1....] . But, i was not allowed to use sort /sorted inbuilt function and you can use only one loop either while or for loop and that also even once and only in this list , not allowed to make another list also.