Your complete guide to acing your tech interview (part 3: the coding & onsite interviews)

|

Congrats! You’ve passed the phone screen (and maybe a remote coding exercise), and are now on to the next, most intimidating part of the tech interview process: the coding interview. This is your chance to show the interviewers that you have the programming chops and problem-solving skills necessary to succeed in the role. (Tip: Seen offers career coaching, interview prep, and even mock interviews–completely free!)

Step 1: Preparing for the coding interview

1. Review CS fundamentals.

The coding interview is like a traditional job interview and a rigorous CS exam all rolled into one, which means you have to study for it, regardless of your educational background and level of experience. And while you could buy a thick book devoted to detailing every algorithm, data structure, and programming paradigm in the computer science universe, you probably don’t have time to read it front to back, and the information probably wouldn’t stick, either.

So, instead of spending your precious preparation time scanning books and mindlessly watching online tutorials, laser-focus on the topics that are most likely to come up in the coding interview:

  • Trees
  • Big O Notation
  • Sorting algorithms
  • Hash Tables
  • Graphs
  • Heap
  • Arrays
  • Recursion
  • Linked Lists
  • Stacks/queues
  • Bit manipulation
  • Well-known library functions
  • Basic computer architecture concepts

2. Know how to study.

Knowing what to study is the easy part. Actually sitting down and studying those topics can be tricky.

Simply reading about a hash table and looking at a diagram is not enough for the information to stick. You need to actually know how to apply it and when to use it, which you can’t really get from a book. The best way to make sure you’re really understanding concepts is to do hands-on practice.

A simple way to start studying, even if you don’t have a coding interview coming up, is by solving one or two coding questions per day. Breaking it up like this keeps you motivated and doesn’t force you to sacrifice too much of your free time, and studies show that “spaced learning” can actually boost knowledge by 50% and improve retention.

So, follow this 10-15 minute process two or three times per day:

  • Read the problem carefully a few times
  • Take time to think about your solution.
  • Write out the pseudo-code.
  • Write out the actual code using the correct syntax.
  • Consider the edge cases. Do you pass them all?
  • Try improving your code by making it more elegant.
  • Review your solution again.
  • Check the solution against the solution in the book or online resource.
  • Think about other ways you could have solved the problem.

You can find coding problems at Codewars, HackerRank, Interview Cake, and CareerCup. If you prefer books, try the coveted Cracking the Coding Interview: 150 Programming Questions and Solutions, written by a woman who passed coding interviews and received offers from Microsoft, Google, Amazon, Apple, IBM, and Goldman Sachs.

3. Choose a language.

Most companies let you choose whatever language you want for the coding interview. It’s a good idea to choose the language you’re most confident with, but there are other factors to consider. What is the company’s tech stack? Is the interview for a “Java developer” position?

Pick your language from the very beginning and use it to study with. Generally, Java, C++, C, C#, Ruby, and JavaScript are safe bets, but be careful not to choose a language just because it’s trendy or you think the interviewers will be impressed. They are more concerned about how you solve problems with your chosen language, not if you know the coolest language on the block.

4. Practice whiteboarding skills.

The whiteboard interview is one of the most dreaded and controversial parts of the interview process. It’s a way for you to demonstrate your coding and problem-solving skills to a group of interviewers, managers, and software engineering team members. You’ll have to solve complex problems with hand-written code, while talking through your thought process and fielding questions from the panel. A single problem can take as long as an hour.

From phone screen to thank you: grab your guide to ace every stage of your interview

If you’ve never experienced a coding interview before, you’ve probably never written out code with a marker and a whiteboard, or even pencil and paper. It’s surprisingly difficult without the crutch of an IDE and the editor’s autocomplete and syntax highlighting features.

That’s why you should prepare for the whiteboarding exercise by buying a mini whiteboard and some dry-erase markers to simulate the interviewing environment. This will help you learn whiteboard space management skills and give you a taste for what it’s like to physically write out code, instead of relying on a keyboard and code editor.

Try Codementor, Gainlo, or interviewing.io to schedule a mock whiteboarding interview with a real tech expert or even a hiring manager.

5. Familiarize yourself with coding interview questions.

There are is no way to tell exactly which tech interview questions you’ll be asked, which is part of the reason why the process can feel so terrifying. However, you can prepare yourself by being aware of the types of questions you may face and the format they may be in. For the whiteboarding session you can expect to see problems like:

  • Implement a well-known algorithm.
  • Implement a trivial algorithm.
  • Find if a binary tree is balanced.
  • Reverse words in a string.
  • Check if a linked list is circular.

You may also encounter CS questions such as:

  • Is it possible to have a recursive inline function?
  • What is an immutable object?
  • What is the difference between two-tier and three-tier architecture?

Again, practice, practice, and more practice is the key to being prepared for any question that comes your way and for fueling your confidence on the day of the interview.


Step 2: During the coding interview

1. Ask clarifying questions.

Don’t just jump in and start coding. Begin by asking clarifying questions, even if you think you already know a possible solution. This not only ensures that you have the best shot at getting a right answer and gives you time to collect your thoughts, but it also shows the interviewer that you think carefully about all sides of a problem before diving in. It can even help you understand the interviewer’s priorities and what they are truly looking for in a solution.

2. Think out loud.

Interviewers are mostly curious about your thought process, not necessarily if you get the right answer. In fact, if you know the answer right away and just turn silently to write out the code, the interviewer may think you’ve heard the question before and already knew the answer from a study cheatsheet. And if the interviewers only cared about whether or not you can write good code, they would just take a quick look at your GitHub.

That’s why you should explain what you are doing every step of the way. It keeps your interviewers engaged and allows them to follow along better and understand your solution. They may even throw out hints or steer you away from a certain solution. It’s helpful to think of them as your support system during the coding interview.

3. Know what to do when you get stuck.

Tech interviews are designed so that you don’t know the answer right away. They don’t exist to test your cheatsheet memorization skills–they are there to asses your problem-solving skills, code fluency, and CS knowledge. As a result, you’ll inevitably get stuck and feel like there’s no way out. If this happens, realize that it’s supposed to happen!

The interviewer is looking at how you react to a difficult problem. Do you stare at the whiteboard in a cold sweat and remain uncomfortably silent? Do you just say “sorry, but I have no idea how to do this,” and leave it at that? Or do you ask clarifying questions, admit that you’re not sure how to solve it, and take steps to solve it anyway?

When you get stuck, don’t act like you know the answer and start writing on the board, hoping that inspiration will strike. Think about the problem for a few seconds and be honest with your interviewer.

Say something like “I’m not quite sure how to do this, but I’m going to try and figure it out.” In most cases, the interviewer will work with you to arrive at a solution. Think out loud so your interviewer can give you hints and steer you in the right direction. Talk about what you think could be a solution, and talk about why it won’t work. Ask for help if needed and bounce ideas around with the interviewer. After all, collaboration is a key characteristic for a software developer.

Try breaking the problem down into smaller, bite-size pieces. Start by writing an inefficient, brute force solution, and work on optimizing it if you can. Remember: coming up with something is better than staring at the whiteboard, throwing up your hands, and saying “I have no idea how to do this.”


Ready for more? Check out the rest of Seen‘s Complete Guide to Acing Your Tech Interview:

Recommended posts