3 ms·
I'd rather not post too many details about the particular question, but it's only slightly more complex than String#split. It has multiple valid solutions, from
by dymk 2y ago
I'd rather not post too many details about the particular question, but it's only slightly more complex than String#split. It has multiple valid solutions, from regex matching to for/while/do&while loops to String#substring. If you have even a basic understanding of your language of choice's standard library, at least one solution is obvious and implementable within minutes.
I'd say about half of the candidates that interview are unfamiliar with the String#substring equivalent of their language. This is for a senior position, and everyone has multiple years of experience on their resume. It's... interesting.
- NhanH 2y agoMy point is: are you sure the candidates failed because of their programming ability (unable to use substring), or was they confused due to the question itself? It is very easy to get to the situation in a interview where the candidate is just straight up unsure on what the question is about. The candidate might fumble not because of not understanding #substring, but rather whether you would accept it as an answer. Many people would say those candidates should be failed anyway due to X, Y, Z reasons. But I want to highlight that in those cases, the interviewers should realize they are assessing something else, and not programming skill.