Given an array containing only characters 'R', 'G', and 'B', segregate them in-place such that all 'R's come first, followed by 'G's, and 'B's last, using O(n) time and constraint of restricted extra…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.