If you’re interviewing for any kind of technology job that touches on programming and software development, chances are good you’ll face a coding skills test. These tests can take the form of the much-dreaded whiteboard exam, an in-office coding gauntlet, or an at-home project. No matter what the format, how can you anticipate and prepare for these kinds of examinations?
First, it’s important to keep some basic things in mind. No matter what the format, you’ll want to ask questions to ensure you understand the problem (and don’t be shy about it; hiring managers and recruiters want you to ask, because it’ll demonstrate your curiosity and thoroughness). As you progress through the problem, make sure to show your work: your thinking process is just as important as nailing the right answer.
From there, things might diverge. Tackling many whiteboard problems comes down to rote memorization and your knowledge of theoretical concepts and processes. As Max Howell, the creator of Homebrew, once famously joked about these kinds of tests: “Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree on a whiteboard so [expletive] off.”
With in-office and take-home coding tests, you have a little more leeway to show off your creativity and streamlined approach to problem-solving; many enlightened interviewers will allow you to use a search engine to look stuff up during the test, because that’s how developers and engineers actually do their jobs in the real world.
With coding tests—especially at-home ones—it’s extremely important to recognize the line between research and outright code plagiarism. Many companies rely on sophisticated plagiarism-detection tools powered by machine learning; if you try to cheat by just copy-pasting large blocks of code, chances are very good you’ll be caught, and you definitely won’t get the job. A well-informed interviewer will make it clear from the outset what’s considered acceptable use of existing code; if they don’t, it never hurts to proactively query them about it.
But what questions will the interviewer actually ask? That’s the question dominating many technologists’ minds, and with good reason. Fortunately, the trick questions so popular at tech companies for so many years (“How many golf balls can you stuff into a 747?”) seem to be fading away. A lot of the focus now is on fundamentals—can you actually build what the prospective employer needs?
Particularly during the initial interview rounds, recruiters and hiring mangers often focus on what technologists (sometimes derisively) call “LeetCode questions.” If you’re unfamiliar with LeetCode, it’s a platform that allows developers and engineers to explore and discuss all kinds of programming-language questions and problems, complete with examples and snippets. While veteran technologists often frame LeetCode problems as too simplistic, recruiters and hiring managers often rely on them as a source when crafting interview questions—they may even simply cut and paste from LeetCode directly into the testing platform.
No matter what role you’re interviewing for, swing by LeetCode as well as HackerRank and Codecademy(which also offers code challenges). Make sure you can solve the questions and problems related to your particular discipline. If you can do that, you’ll be well-prepared for whatever the interviewer throws at you, especially if it’s an initial interview, where the questions tend to be broad in scope.
Over at HackerNoon, there’s an in-depth breakdown of the most common elements in tech interviews, including how often certain topics pop up (for example, the top five patterns observed in coding tests: graphs, linked lists, sorting and searching algorithms, tree algorithms, and string and array manipulation). Review that for some good advice on the technical aspects of the interview—but keep in mind that any interviewer will also want you to talk about your communication and teamwork skills, and determine how you fit with the company’s culture and values.