Added solution to sort3 problem