News for hackers. Stuff that matters.
Re:Stripe CTF3: Distributed Systems is live by thezoid on Wednesday January 22, 2014 @09:44PM (#7106761)
I changed one line to make it work faster.

From the "best" score I was worse than it by 150 or something. Not that I care really.

Re:Stripe CTF3: Distributed Systems is live by dclara on Friday January 24, 2014 @03:43PM (#7117868)
Looks like one simple change to hashmap may not be the best answer. May I draw the conclusion from your case like that? The best score now went up to almost 3000. I couldn't imagine how many possible ways out there and one of them could be that excellent. Just curious.
Re:Stripe CTF3: Distributed Systems is live by platypii on Friday January 24, 2014 @07:24PM (#7119177)
Sorted list + binary search was 2000pts and ran much faster than the hashmap solution.
Re:Stripe CTF3: Distributed Systems is live by dclara on Friday January 24, 2014 @07:45PM (#7119281)
Thank you so much for your info. This is something I'm looking for from the beginning of the discussion.

http://www.algolist.net/Algorithms/Binary_search

This is my original answer! I should not sort the input list though since it's not necessary.

But is string.indexOf() will be even faster?