My solution to least greater to the right