Google Interview Question

Various methods to sort colours