Sort:  

That is the hard part, getting the length.