I want to sort a list of android.location.Location. The sort should base on the distance of my location to the location from the list. So i think the distance should be calculated during the search process. And so I’ve decided to use insert sort.
Is this the right choice?
Thanks a lot
If it’s a
Listof locations, I’d go withCollections.sort+ a customComparator: