changed 5 years ago
Linked with GitHub

Instructions for the interviewer only!

Interviewer, take a few minutes to read over this script to prepare for the mock interview. Once you’re ready, begin the interview (timeboxed to 25 minutes).

  • Here’s the problem you’ll give: “Design a method to find the number of occurrences of any given word in a book. A word is represented as a String and a book is represented as a list of strings. This method will be called multiple times.”
  • The interviewee should now be asking some clarifying questions before jumping into the code. If they ask the right questions, here are the responses you’ll give:
Their clarifying question: Your answer:
“Could my inputs ever be null or empty?” “Yes. Return a value of -1 in these cases.”
“Does case-sensitivity matter?” “No. For example, ‘puppy’ and ‘Puppy’ should not be counted as two separate words in the book.”
“Can I assume that the input characters in the String will only be alphabetical letters?” “No. You don't need to handle unexpected symbols in the input, but a string could potentially have a space in it. So for example, ' queen ' and 'queen' should NOT be counted as two different words in the book just because one has extra spaces.”
“Should I make my method time / space efficient?” “Yes, make sure it can efficiently handle multiple calls.”
  • If the interviewee doesn’t ask any of these clarifying questions, let them continue (but be sure to give them this feedback after the interview).
  • If the interviewee is silent for a long period of time at any point during the interview, ask them: “Can you tell me what you’re thinking?” or “Can you talk me through your thought process?”
  • Once the interviewee is finished coding their solution:
    • have them talk through different test inputs (including edge cases)
    • have them explain the runtime complexity of their code
Select a repo