r/ProgrammerHumor • • Mar 16 '20

Sort algorithm

65.4k Upvotes

614 comments sorted by

View all comments

3.8k

u/theeggman84 Mar 16 '20

If she's doing bucket sort at this age, then she's set.

776

u/SharkLaunch Mar 16 '20

But sets are unordered

2

u/Botahamec Mar 16 '20 edited Mar 17 '20

They're sorted by hashcode

Edit: It's actually sorted by the value of (hashcode % set.size)

→ More replies (2)