2 ms·
> It's actually two passes: one to create the set, and one more again to find the character. Those are combined into a single pass in the example in the articl
by chrisseaton 7y ago
> It's actually two passes: one to create the set, and one more again to find the character.
Those are combined into a single pass in the example in the article, aren't they?
- bootloop 7y agoYea I don't understand what the parent comment wants to say. You need to have a lookup structure (even if its only a bit) and then you can do one pass over the string. The lookup or adding a character doesn't count as a pass. And there is no way to omit this anyway.