radzio
Technical User
- Aug 10, 2011
- 7
Hi All,
I got stuck on a quite silly problem but I'm no a programmer and I really need to do it... I have a set of ordered triples (of integer numbers) in a array like:
[tt]h1 k1 l1[/tt]
[tt]k2 k2 l2[/tt]
[tt]...[/tt]
[tt]hN kN lN[/tt]
where N is rather big (lets say more than 200,000). Some triples are the same. How could I sort such list so that the triples of identical indices will be adjacent? I was thinking of radix sort but I have no idea how to write it in a simple way (I'm a beginner user) so it would be as fast as possible.
Thanks a lot for helping me
Radek
I got stuck on a quite silly problem but I'm no a programmer and I really need to do it... I have a set of ordered triples (of integer numbers) in a array like:
[tt]h1 k1 l1[/tt]
[tt]k2 k2 l2[/tt]
[tt]...[/tt]
[tt]hN kN lN[/tt]
where N is rather big (lets say more than 200,000). Some triples are the same. How could I sort such list so that the triples of identical indices will be adjacent? I was thinking of radix sort but I have no idea how to write it in a simple way (I'm a beginner user) so it would be as fast as possible.
Thanks a lot for helping me
Radek