Tweet
(1/2) wow my big O is rusty. Implementing a string operation that requires one lookup per character. Option A is a lookup table, O(n); complexity grows with the string’s length. Option B is a binary search, O(n•log(m)); complexity grows with both string and search space size.
(original)