News for hackers. Stuff that matters.
Re:All Algorithms Implemented in Rust by 988747 on Monday August 22, 2022 @04:40AM (#32548861)
No expert on algorithms, but:

Sorting an array is O(n*log(n))

Hashmap operations are constant time, and walking through array to put stuff in it is O(n)

So, implementation based on Hashmap should be slightly faster. It requires extra memory, though.

Re:All Algorithms Implemented in Rust by IshKebab on Monday August 22, 2022 @10:57AM (#32552373)
Oh yeah that is true. I am an idiot.