3 ms·
Just to point out, if you really will have a tiny list and that's knowable, it's possible this example would be best with a straight linear time check. It could
by darkxanthos 12y ago
Just to point out, if you really will have a tiny list and that's knowable, it's possible this example would be best with a straight linear time check. It could be fewer operations than hashing a string and looking it up. Practically pedantry though.