DEV Community

Cover image for 5 tried and true techniques to prepare for a coding interview
Amanda Fawcett for Educative

Posted on • Updated on • Originally published at Medium

5 tried and true techniques to prepare for a coding interview

Coding interviews are a mixed bag. It depends on the company, the interviewer, your skill set, etc. There’s no silver bullet for acing the interview, no matter how much we wish. It essentially comes down to how you prepare.

This may seem trivial, but you’d be surprised at how many candidates wait till the last minute to start laying out their prep plan. Here, we’ve outlined the top 5 things you should do to prepare for the interview. However, when it comes to landing your interview, there are services out there like Triplebyte that streamline the process significantly.

Alt Text

At most companies, they don’t require you to work in one specific language, but they do require you to interview in one and stick with it. You should be familiar with the syntax, nuances of the language (i.e. memory management), and the most commonly used collections, libraries, etc. You should also know how to test your code, as well as come up with corner cases and edge cases.

But what if I’m comfortable in more than one?

Here are some guidelines for selecting your language:

Choose the language you’re most comfortable with...Can you easily go from problem to solution? If someone asked you to sit down and write a solution to a problem in 25 minutes, what language would you go with? Think carefully about this. Some languages have different built-in types and paradigms, meaning the language you choose can change how you solve the problem and what problems you get asked.

As an example, common interview questions asked in Java deal with manipulating a linked list. However, in Python, lists are a built-in datatype so you usually won’t see questions like this.

Ultimately, you shouldn’t let this decide what language you choose, but if you’re struggling to decide, choose the one that will make your life easier. This is partially why some developers choose Python over Java or C++; there’s less extra fluff.

Interview pass rate by language

Some languages have a better pass rate than others. Triplebyte scraped together data and found that those who interview in Ruby, Swift, C#, and Python have a better success rate in interviews than those that choose Java or C++. This could be due to a few reasons, the main being that they’re dynamic languages. With that said, you should choose the language you have the most experience in and the one you’re most passionate about. You can check out their full write-up here.

Consider interviewing in a dynamic language

Why? Well the syntax is compact, the typing is flexible, and they’re considered permissive and expressive, making them a great option when trying to cram lines of code onto a whiteboard.

Know the operations like the back of your hand

You should be very familiar with the types of operations available to you and when to use them. You should know string operations, array, and list operations. For example, you should know how to split a string, how to transform a char into a string, and even more simple things like how to read/write to/from a file, and how to declare 2D arrays.

Lastly, find out what languages the company uses and lean towards those

Don’t fret if the language you’re planning to use is not one the company uses, especially if you’re a new grad where you’ll learn new languages and skills on the job. When they interview you, they may ask if you know any other languages, this is to see whether you’re eager and willing to learn.

Common languages at some top companies:

  • Microsoft: C++, Java, C#, Python
  • Facebook: Java, Python, Perl, PHP, C++
  • Google: Go, Python, C++, JavaScript
  • Amazon: Java, Javascript, Ruby, Python, Perl

Alt Text

This is up for debate and depends on how much you already know and your comfortability. It may seem like a lot, but three months is usually the sweet spot for prep time. There’s a lot to cover, from algorithms and data structures to system design and object-oriented design so it’s best to space out your practice and take the time to understand each concept thoroughly. When your practice is finished and you feel ready to schedule your interview, we recommend checking out Triplebyte.

When studying for three months, there will be days when you are unmotivated, in times like this it’s best to set a routine and hold yourself to it. If your ultimate goal is to land the job, you need to always be progressing towards that goal. You’ve probably heard the concept of “no zero days”; little progress is better than none at all, so even if it’s 30 minutes a day that will be enough to keep you on track.

Find a routine that works for you. Here is a tried and true routine that has worked for software developers who’ve landed jobs at Facebook and Microsoft. While you’re beginning your practice, it’s important to keep these guidelines in mind:

  1. Start timing yourself. Ideally, you shouldn’t spend more than 20–30 minutes solving any given problem. (This probably won’t be possible for all questions right away.)

  2. Don’t be discouraged if you are not able to solve a problem within the allocated time. Solve it even if takes you a couple of hours, without looking at the solution. This will help you build the confidence that you can solve it and then you can focus on solving them faster later.

  3. Start thinking about the Runtime and Memory complexity of each solution. You will have to articulate the complexities in the actual interview clearly, so it’s better to start now.

Alt Text

Each company interviews a little differently. They all have their own values, as well as methods and styles for interviewing. As an example, Google waits for you to have 3-5 years of experience before they ask system design questions, whereas Facebook will ask it to new grads.

Study up on the company

Some companies like Google and Facebook put right on their career page what you should study. This is really valuable information that can relieve some anxiety when you’re preparing. Also, almost every company has their values and culture on display for you to check out. Again this is valuable information that shouldn’t be overlooked. According to Triplebyte, about 50% of candidates who fail interviews at companies fail for non-technical reasons. Culture plays a big part when companies evaluate you, a great example of this is Amazon’s “Bar Raiser” who is an expert in evaluating you against their 14 core principles.

Find out what different products they sell, try them out if you haven’t used them, and be sure to have some opinions about what you like and dislike (make sure you explain why and what changes you’d make) about the product.

Learn how they interview

Are you required to take an online assessment? Is the coding portion whiteboard or laptop-based? What do they look for in candidates? Learning how a company interviews will help you prepare accordingly, and can greatly reduce your anxiety. To find out how some of the top companies interview, you can check out detailed interview guides on CodingInterview.com.

Alt Text

As briefly mentioned in the previous section, behavioral/cultural interviews are just as important as the technical portion, and in some cases even more so. As a best practice show how what you’ve done relates to the position, and tailor it to the job description as it will better demonstrate how you’re a fit for the role. It’s also a good idea to show how the work you’ve done can translate into their core values.

Here are some basic rules in cultural fit interviews:

  1. Show interest in the product, and demonstrate an understanding of it.

  2. Be ready to describe scenarios where you had a conflict with your teammates or managers and how you resolved it. Please don’t say that you never had a conflict if you’ve been working as a software engineer for a few years.

  3. Talk about what you want to accomplish in the company

  4. Talk about some of your recent / most significant accomplishments as an engineer

  5. Talk about some particularly crazy/difficult bugs that you encountered.

Alt Text

Before scheduling your interview, it’s a good idea to practice what it’s like to be in a real interview. Have a programming buddy? Grab him/her and ask them to sit down with you for an hour. There are also sites out there like Pramp that offer free mock interviews which can give you a good idea of what it’s like to be timed and evaluated.

Wrap-up

While there are many strategies for preparing for a coding interview, these 5 have been used by developers to land jobs at top tech companies. While this post has covered how you should prepare, it doesn’t dive into the process for actually setting up your interview. When it comes to that, there are sites like Triplebyte who greatly reduce the amount of time to get hired.

Further readings

Top comments (0)