News for hackers. Stuff that matters.
Re:Removing Array Duplicates by ww520 on Friday April 12, 2019 @08:47PM (#19650326)
Since the array size is known ahead of time, it's easy to initialize a hash table with an optimal capacity. No need to use fancy tree structure.
Re:Removing Array Duplicates by KirinDave on Saturday April 13, 2019 @01:35AM (#19651274)
The size of the table isn't the trick. It's the perfect hash function that you want. If you have that then you've already solved the problem at hand.