2 ms·
I suspect you'll want something a touch faster than O(l) for every lookup, in fact given the previous constraint of memory being no problem, you should instead
by z_ 15y ago
I suspect you'll want something a touch faster than O(l) for every lookup, in fact given the previous constraint of memory being no problem, you should instead use a hashtable.