| If given a question about reversing a string, it lets you ask the interviewer questions like: * Do you want to do it in-place or as a copy? * Is it an ASCII or Unicode string? If using Unicode, I assume you want to reverse on grapheme cluster boundaries? Asking these questions let you as a candidate demonstrate your knowledge. If the candidate doesn't ask these questions, the interviewer can ask follow up questions like. * What is the time/space complexity of the algorithm? (Easy answer!) * How does this work with UTF strings? I don't particularly like the question, but have been in interviews where this exact question was used. From the discussion with the candidate it did very quickly weed out inexperienced developers. I was amazed at how many people applied for roles and had no knowledge of these concepts. > Do you actually reverse strings here? We've also tried doing more in-depth code exercises, which are more applicable to our business domain. That didn't work much better, and required upfront work from the candidate, which isn't always fair on them. Anyways - happily not involved in the recruiting process any more. |