6

I'm asking because inside a hashmap each element would have a signature, then it's easier to compare, no? #question

you are viewing a single comment's thread
view the rest of the comments
[-] sukhmel@programming.dev 4 points 1 week ago

I'm not sure I understand you, but the signature will most often have a separate ordering that won't help with ordering the objects themselves.

Also, there are TreeMaps, that maintain order of elements, but those do the work on every insert

this post was submitted on 06 Oct 2026
6 points (100.0% liked)

Ask Experienced Devs

1517 readers
4 users here now

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 3 years ago
MODERATORS