Wednesday, April 20, 2016

How to Ace the Whiteboard Coding Interview

1. When presented with the coding problem by the interviewer, be sure to communicate and ask questions to confirm the details of the problem statement. For example, if you are asked to check the permutation order of two strings, clarify if the solutions should account for case sensitivity and if whitespace counts.  Sometimes the interviewer might intentionally omit part of the information necessary for solving the problem, just to see if you will ask for it.

2. The whiteboard has only so much writing space, so plan ahead starting at the top left corner  and possibly dividing the board into two or three columns.

3.  The interviewer will often let you pick the coding language you want to use to implement the solution, however this is not always the case. You should do some homework and find out what is the development stack in the company where you are interviewing. Or perhaps you have already contributed to the company's opensource git repository and are familiar with their code base.

4. As you work on your coding solution, talk out loud so that the interviewer can get an insight into your thought processes.  They are looking at finding out about general problem solving skills as much as about the solution to the specific coding problem.

5. If stuck, don't be afraid to ask for hints. Asking  the right questions is a big part of problem solving and therefore, coding.

6. Draw yourself a visual diagram to help you understand the problem. This also demonstrates your use of a powerful problem solving technique: visualization. However, be mindful of the available space on the whiteboard.

7. Unless you know exactly how to code the solution, work in progressive enhancement manner. Code a simpler version of the solution, perhaps adding //todo comments for the parts you don't know how to code yet.

8. Syntax is important, but it's not all important, at least not for the whiteboard interview. If your algorithm is correct but you forgot a semicolon, you have in essence successfully solved this coding problem.

9. Ask the interviewer if they want you to test the code with sample value(s).

10. Use  basic good programming style, such as meaningful variable names, pick a  naming style such as camelCase and use it consistently for all your variables.

11.  Become familiar with online interview tools, which are becoming a more common part of the interview process. A couple examples of such tools include  https://www.hackerrank.com/  or https://www.proveit.com/default.htm

12. Show a generally positive attitude. There is a large human interaction component to the whiteboarding interview. The interviewer is also assessing if you will be a good fit for their team.


13.The above tips will help with the whiteboard coding interview, but they won't be enough if you don't come prepared with solid programming knowledge, which can only be acquired over an extended period of time and with daily practice.

The following is a list of topics which often make appearance at programming interviews. Mastery of these topics can only be acquired with daily practice, so start practicing your coding now!
For an in depth coverage of the Coding Interview process as well as coding challanges, I recommend the book Cracking the Coding Interview by Gayle Laakmann McDowell

Possible Technical Interview topics:
String Manipulation
Data Structures: Arrays, Linked Lists, Stacks, Queue, Trees, Graphs
Code efficiency (Big O notation)
Sorting and Searching, Bit Manipulation, Recursion,
Object Oriented Design
Testing Fundamentals
Scalability
and more...


2 comments: