Comment by Cakez0r

5 years ago

It's not a premature optimisation to use a hashset instead of a list though!

The bug is more devious than that. The code looks linear at a glance and the culprit is that sscanf is actually O(N) on the length of the string. How many people would expect that?