3 ms·
It's easy to print a map in arbitrary order. All you have to do is create an array, iterate the map append to the array, create a new type, define the Len() and
by millstone 8y ago
It's easy to print a map in arbitrary order. All you have to do is create an array, iterate the map append to the array, create a new type, define the Len() and Swap() and Less() functions for that type, cast your array to that type, and finally call Sort on it. It's literally less than 20 lines of code.