The Top 30 Software Engineering Interview Questions of 2021

Software Engineering jobs are among the most in-demand and highest-paying jobs on the labor market today. The U.S. Bureau of Labor Statistics projects that software engineering jobs will grow by 22% in this next decade. Nevertheless, like every other role in tech, you'll have to ace the software engineering interview before you can get your foot in the door.

Individual SWE roles can differ dramatically based on the company. The role has an enormous variation, and this can make it hard to prepare for upcoming interviews. It's natural to feel quite a bit of anxiety, given the complexity of the role. To help you prepare, we've talked to many SWE candidates, current software engineers at the top tech companies, and technical managers for an inside, comprehensive look into the SWE interview.

Here is our list of the top 30 software engineering interview questions you will likely experience. However, we've also included an overview of the SWE question categories to help you understand what hiring managers expect from these questions and why. Whether your interview focuses on System Design, Data Structures, or Algorithm questions, our SWE mini-guide will give you a better idea of where you stand as a candidate. So, let's get to it!

System Design

  1. Design a reservation and payment system for a parking garage. Watch our answer to this question here.
  2. How would you design and implement a password checker given certain requirements for the password?
  3. How would you design a relational schema for a calendar application?  See our example answer to this question here.
  4. Design a service that supports uploading and tagging images to a travel site.
  5. How long does it take to send a signal from one computer to all other computers? Watch an answer to this question here.
  6. Design a visual landmark recognition system.
  7. Design an app to be used in an amusement park.  See our example answer to this question here.
  8. Design a typeahead box for a search engine.  See our example answer to this question here.
  9. How does Alexa process voice commands?
  10. Design Facebook Messenger. Watch our co-founder, Jacob, answer this question below.

Data Structures

  1. Store a list of numbers as a single number.  See our example answer to this question here.
  2. You are given a table with varying distances from various cities. How do you find the average distance between each of the pairs of cities?
  3. Determine if the given Binary Tree is a BST or not.
  4. Find k-th smallest and k-th largest element in BST.
  5. Determine if an array from 1..n has a duplicate in constant time and space.

Algorithms

  1. Write a pair of functions to serialize and deserialize a list of strings. Watch an answer to this question here.  
  2. Iterate through a list of trades and return a list of buy/sell pairs as well as the overall profit of the trades.
  3. Merge Intervals. See our example answer to this question here.
  4. Print left view of a binary tree. See our example answer to this question here.
  5. Given an nxn grid of 1 and 0s, return the number of islands in the input. See our example answer to this question here.
  6. How many hoops will a VM in one region have to go through to talk to VM in another region?
  7. Find the minimum cost to reach the last cell of the matrix from its first cell.
  8. Find the index of 0 to replace to get the maximum length sequence of continuous ones.
  9. Find the index of 0 to replace to get the maximum length sequence of continuous ones.
  10. If you had a vector with a lot of values in it, of which most are zeroes, how would you design a data structure to represent it?
  11. Write a program to print the maximum positive sequence in a given array.
  12. Find the number of rotations in a circularly sorted array.

Product Strategy

  1. Should Facebook consolidate its messaging apps? See our example answer to this question here.
  2. Should Apple go into modular phones? See our example answer to this question here.
  3. Why is Android strategically important to Google?

A Closer Look at the Types of Software Engineering Interview Questions

Fruitful - Free WordPress Responsive theme source code displayed on this photo, you can download it for free on wordpress.org or purchase PRO version here https://goo.gl/hYGXcj
Photo by Ilya Pavlov / Unsplash

System Design

When it comes to day-to-day software engineering, candidates will rely primarily on their coding skills. However, coding isn't everything. The best software engineers also have strong system design skills. System design refers to the development of software architecture, product design, interfaces, data, and more for a technical system according to a set of requirements.


Expect one or two  system design questions like those listed above. Often, companies will ask you to design a system that solves a realistic challenge for the company, so be sure to read your target company’s engineering blog before interviewing. This, and the structure of the system design interview, which tests a candidates knowledge, problem-solving, and high-level thinking, makes this round a great test of how a new software engineer will perform on the job. The best software engineering candidates have a comprehensive knowledge of distributed systems from component-level decisions to APIs and how to scale a system reliably and efficiently.


Be sure to check out our system design interview course to help you ace any system design question that comes your way.

Data Structures

The foundation of software engineering is in data structures and algorithms, hence the popularity of leetcode-esque coding questions. The best SWE candidates understand how data structures work and practical use cases for each. Many technical interview questions/coding exercises focus on your knowledge of data structures and appropriate algorithms (covered next).


The best way to prepare or these questions is to review the following primary components in data structures:

Once you’ve reviewed the basics, try your hand at some self-guided practice data structure lessons to test your skills.  

Algorithms

Like data structures, engineering algorithms are another fundamental piece of software engineering. An algorithm is a set of rules or procedures that your system or program performs during its operation. When it comes to the SWE interview, your hiring manager will expect you to identify and work with various algorithms that are most appropriate to whatever problem you’re given. Algorithm and data structures questions are useful, concrete tools hiring managers use to assess a candidate's problem-solving and experience.  

Be sure to review the most important algorithms such as those to search, sort along with the notorious dynamic programming algorithms. You can find many examples of these algorithms in our SWE interview course.

Product Strategy

Don’t worry - product strategy is probably not part of your software engineering interview. However, it is still critical for companies that their software engineers understand the product strategy that ultimately drives their development. Having an understanding of:

  • Who your target company’s users are and what they want (market mnalysis)
  • What the competition looks like (competitive analysis)
  • What the company strategy and product pipeline may look like (roadmapping and business strategy)

may give you quite an edge if you're interviewing with an ultra-competitive tech company.


If we’ve piqued your interest, you can check out a few Product Strategy lessons in our Product Management interview course.

How Top Tech Companies Assess Software Engineering Candidates in 2021

Some of the Unsplash Team fam working together 🤘
Photo by Annie Spratt / Unsplash

Now that we've gone over the types of software engineering interview questions you'll face, we should cover how hiring managers in 2021 assess their SWE candidates. Specifically, here are the primary skills or dimensions that SWE interviews evaluate.

Technical Skills

It should come as no surprise that the fundamental dimension of SWE interviews centers on assessing a candidate's technical skills. Hiring managers seek candidates with knowledge and experience in the programming languages, frameworks, cloud services, etc used at the company. Not only that, hiring managers seek candidates who can write clean code that is easy to maintain. To evaluate a candidate's technical skills, hiring managers ask many of the previously listed technical questions. There's a good chance SWE candidates will need to complete coding exercises during their interviews.

Problem-Solving Skills

While candidates will never get an offer without the necessary technical skills, make no mistake: a software engineer's most important skill set is problem-solving. Software engineers are responsible for developing complex systems to address complex problems. Such endeavors require tremendous problem-solving skills, as you can imagine. Not only that, but high-level problem-solving skills also allow software engineers to spot or anticipate bugs while finding new ways to write faster code.

Problem-solving is the most important and the most difficult aspect of being a software engineer. Therefore, one way or another, nearly all the interview questions your hiring manager will ask are meant to evaluate some component of your problem-solving abilities.

Communication Skills

What might not be so unsurprising, however, is the emphasis on the communication skills of SWE candidates. While the majority of your work as a software engineer will undoubtedly be writing code, SWE also needs to write emails, slack messages, documentation, and more while communicating with co-workers and other teams. Your interviewer may assess these skills with questions such as "How do you explain engineering concepts to non-technical team members?"

Culture Fit

As we mentioned, software engineers are some of the most sought-after and highest-paid workers in today's economy. But the other side of this coin is that the competitive landscape at the top tech companies is fierce.  FAANG companies like Google, for instance, receive millions of applications a year. As such, culture fit is more important than ever for hiring managers. It's simply not enough to have the technical skills necessary for the role. Candidates will need to mesh well with the corporate culture and the other employees at the company. Generally speaking, hiring managers will ask behavioral questions to assess culture fit.

If you're interested in preparing for this aspect of the interview, be sure to check out our Tech Company Core Values article here.

More Software Engineering Interview Prep

While studying commonly asked SWE interview questions are crucial, you'll need some more interview prep to really boost your chances. Fortunately, you can find plenty of different resources and types of resources at Exponent to help you practice for your upcoming SWE interview:

💬 Get prepared with example SWE interview questions

📖 Read through our Software Engineering company interview guides

👯‍♂️ Practice your behavioral and system design skills with our mock interview practice tool.

👨‍🎓 Take our complete Software Engineering interview course.

Anthony Pellegrino

Anthony Pellegrino

I’m a rather bohemian freelance journalist and tech content writer. Philosophy/CS student - A.I.,Consciousness, Social Sciences.

Read More