4 ms·
Fails on the first example in TFA.
by bboreham 8y ago
Fails on the first example in TFA.
- deathanatos 8y agoI think your parent's solution simply considers the empty string not part of the language. The article thinks it is. It's a trivial adjustment to the solution to include it.
- bboreham 8y agoConsider the context: parent is talking about how easy the problem is to solve in an interview. Coding interviews serve to check _how_ a candidate goes about solving a problem - if they submit without checking the solution meets the spec, or choose to solve a different problem without mentioning it up front, then this tells me plenty about their working style.