Simplified solution for GoroSort