3 min to read
In the spirit of trying new things, I signed up for the debate team during freshmen week. I still have great memories of playing board games into the night of our common room. Many of us freshmen were new to debate, so we went to novices training each week.
In some ways, standing up to be judged for a debate speech is not that different from white board interviewing. In APDA-style debate, the opposition (interviewee) does not know the topic in advance, though there are many common topics (questions/algorithms). In one training, we learned the "7 Deadly Opps" that can take down nearly any proposed case. I wish I had my handout from all those years ago, but the arguments included "too expensive", "bad implementation", "think of the children/elderly/etc". They were cliche arguments that provided a handy crutch for the leader of the opposition to construct a speech in the 7 minutes it takes for the first team to lay out their case.
White board interviewing definitely exercises some of those same skills, as well as inspiring the same nerve-wracking anxiety. In the spirit of debate's "7 Deadly Opps", I present my version of the "7 Deadly Whitboard Opps".
- If you are given an array or hash and are not sure what to do, try iterating through the items of the array/hash.
- If you do not remember how to implement something, such as a search or sort, factor it out to helper method. It gives you time, plus the interviewer may tell you not to bother writing it out.
- Could there be a recursive solution? If yes, think of the base case to stop the recursive calls. If recursion makes you sweat, try an iterative solution -- recursion is elegant but not necessarily efficient.
- Before you start code, draw out the problem on the board. The interviewer may correct misunderstandings you have about the problem.
- If you are stuck, do not ask for a hint. Talk out loud. Preface with "I am thinking right now", "This may be a solution", etc to signal that it's not your final answer.
- This tip is from Gayle McDowell, author of Cracking the Coding Interview: when in doubt, think hashmaps/associative arrays/dictionaries/hashes/whatever it is called in your language of choice. Lookup is O(1) once you've sorted the elements.
- If you look confident at the board, you'll feel more confident. Bring your own whiteboard marker with a fine tip. You will fit more code on the board and do not have to worry about dying markers. Seriously impressive.
List to be updated as I think more.
2014-03-08 12:54:23 -0800