Sorting question
- To: mathgroup at smc.vnet.net
- Subject: [mg52758] Sorting question
- From: Nimrod <jdedguard-agent at yahoo.co.uk>
- Date: Sat, 11 Dec 2004 05:23:38 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
A simple sorting question that has me stumped as to how to do it both quickly and elegantly. I have a list of data pairs of the form (distance, time). I want to sort on the distance element and then remove all pairs where the time element is out of order with the distance element. For example ((1,1),(2,3),(3,2),(4,4)) --> ((1,1),(4,4)). The actual lists are much longer. Thanks in advnace, Nimrod.
- Follow-Ups:
- Re: Sorting question
- From: DrBob <drbob@bigfoot.com>
- Re: Sorting question
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: Sorting question
- From: yehuda ben-shimol <benshimo@bgu.ac.il>
- Re: Sorting question