Given an array containing two types of elements (blue and red balls, represented as 0 and 1), rearrange them in-place so that elements of each color are segregated.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.