Interview Whiteboarding- how to do it right

In the tech industry, you sometimes hear people talking about whiteboarding during interviews. In a whiteboarding session, you do not code on the computer; rather, you write down your thoughts, pseudo code, and examples on the whiteboard. The interviewer can get to know you and how you think through this process, and might even decide that he does not need you to code on the computer at all. In Hack Reactor, we had several chances of practicing whiteboarding, and the following are my thoughts on how to do it right:

  1. Slow down! Make sure you understand the question before you start doing anything. Double check with your interviewer if you need clarification.
  2. Illustrate what you are going to do by listing the target function, input, and output. Ask the interviewer for the input type and value, and the output type and value.
  3. Ask/clarify time constraints (time complexity), and space constraints (space complexity). List those constraints under input/output.
  4. If you don’t have a clue on how to start, it’s good to start with a simple example. What’s the simplest example you can think of for the function? Draw that on the whiteboard. You can go through your theoretical steps by marking the process in your example.
  5. Try to find edge cases. What condition will break your previous process? How can you fix that? Add those fixes to your process.
  6. Try to come up with a more complex example. Test it through process 4 & 5.
  7. Your interviewer might ask you, “Are you confident with your method?” Try not to say that you are confident. Instead, try to find an even more complex example to test. After testing, you can maybe ask the interviewer if he/she can think of any condition that you missed.
  8. You might need to refine your process into pseudo code. Remember, it’s pseudo code! Don’t try to write real code! Your pseudo code should be cleaner since you have summarized your illustrated process.
  9. Keep smiling all the time and don’t be afraid to ask questions if you are stuck at a certain point.
That’s my quick note for how to whiteboard in tech interviews. Do you have any tips or suggestions? Please share with me.

Leave a Reply

Your email address will not be published. Required fields are marked *