Your sort is very messy, the point was to use `Array.sort` with a given function. Other than that you should only be filtering once, the code you wrote can be refactored to do the same with clearer code.
Your sort is very messy, the point was to use
Array.sortwith a given function.Other than that you should only be filtering once, the code you wrote can be refactored to do the same with clearer code.