Pocket Gems Interview Question

Phone interview: Sort colored balls