RosettaCodeData/Task/Sort-an-array-of-composite-structures/00DESCRIPTION

18 lines
510 B
Text
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
Sort an array of composite structures by a key.
For example, if you define a composite structure that presents a name-value pair (in pseudo-code):
2013-04-11 01:07:29 -07:00
Define structure pair such that:
name as a string
value as a string
and an array of such pairs:
x: array of pairs
then define a sort routine that sorts the array ''x'' by the key ''name''.
This task can always be accomplished with [[Sorting Using a Custom Comparator]]. If your language is not listed here, please see the other article.
2016-12-05 22:15:40 +01:00
<br><br>