On Mon, 2022-05-30 at 08:23 -0700, Vejju Deepesh wrote:
> I want know the method of preventing sorting by default and maintain
> the map in the order of insertion
If you want ordered return of elements and O(1) look-up, use a slice
and an index map. Insertion becomes and appends and a map insertion
with the length of the slice after append (if the element is not
already in the map - no-op otherwise), look-up is an index map query
and then slice access, and container dump is an iteration over the
slice.