Add comment about requirements
Use .front instead of x[0]
Add tests for descending sort