Iterate/sort associative array by value?
Robert M. Münch
robert.muench at saphirion.com
Sun Apr 7 15:41:51 UTC 2019
I have an AA int[ulong] and would like to traverse the AA from biggest
to smallest by value. Is there an elegant way to do this?
The only way I can imagine is to create an "reverse" AA of the form
ulong[int] and than sort by keys. Traverse this AA and use the value as
the lookup key in the orginial array. But this feels all a bit wired...
--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster
More information about the Digitalmars-d-learn
mailing list