3 ms·
The linked to article explains this is a real problem that the author needed to solve at scale. (I still think the question is unfair, but my objection is more
by the_af 4y ago
The linked to article explains this is a real problem that the author needed to solve at scale.
(I still think the question is unfair, but my objection is more about the stressful interview situation where the real problem you're solving is "desperately trying to pass this or N other interviews you're currently doing").
- patmcc 4y agoThe thing I hate about this kind of question is there seems to be no expectation that a candidate will try to dig into the requirements. What's the function going to be used for? Are we talking about strings of length 32 or strings of length 32k? Is this going to be run a billion times a day or 12? We're not competing at some contest, we're trying to solve real problems here. I'm not going to waste a couple hours hammering out some ultra-optimized code so the logAnalyzer4000 can run its hourly batch jobs 0.004% faster. If we need it to handle strings of length N with a dictionary of size M comprised of strings from length X to Y, tell me that, and we can plan (and benchmark) based on that.