Hi, I’m Brian, a former senior software engineer and now software engineering mentor at Pathrise. I have worked with hundreds of software engineers to help them land their dream job. Check out our list of software engineer interview questions from top tech companies.
Updated in 2021
Your onsite interview is approaching! This is likely the final step between you & your dream job and it’s a big one. How can you make sure that you nail the onsite and turn that interview into an offer?
We created a list of 93 software engineer interview questions from top tech companies so you can prepare for your interview by practicing the types of questions you will be asked. We also included tips to keep in mind in your sessions so you are confident and successful.
- Data structures
- Problem solving
- Low level systems
- Systems design
- Object-oriented programming
- API questions
- Language trivia
- Logic critical thinking
Software engineer interview questions
- Find all the combinations of a string in lowercase and uppercase.
- For example, string “ab” “ab”, “Ab”, “aB”, “AB”
- Airbnb question – You are provided a set of positive integers (an array of integers). Each integer represents a number of nights users request on Airbnb.com. If you are a host, you need to design and implement an algorithm to find out the maximum number of nights you can accommodate. The constraint is that you have to reserve at least one day between each request, so that you have time to clean the room.
- Input: [1, 2, 3]; output: 4, because you will pick 1 and 3
- Input: [5, 1, 2, 6]; output: 11, because you will pick 5 and 6
- Input: [5, 1, 2, 6, 20, 2]; output: 27, because you will pick 5, 2, 20
- Implement a circular buffer using an array.
- Write a function to detect if a string is a palindrome
- Twitter question – Given a n-by-n matrix, each cell has a value of either 0 or 1. A cell indicates a wall if its value is 1. give the length of the shortest path from M to M[n-1][n-1]. You can move either up, down, left or right.
- How do you reverse a linked list?
- Apple question – Given a function magicNumber() that returns a random integer 1 or 0, write a new function that will generate a random number that uses this magicNumber() function.
- Given an amount of money (such as $1.32), return the minimum number of coins needed to make that change.
- Intel question – Given an array of n integers. Derive an array where the value of the element at index i is the product of elements in the given array except element i in the given array. The complexity should be O(n).
- Microsoft question – Remove duplicates from an integer array (unsorted)
- Write a function to find the middle of a linked list. Use it to perform merge sort on a linked list.
- Palantir question – If you have a large array of integers, write an algorithm that will find out if any 2 sum to zero. What is the Big O of the algorithm? Come up with ways that are not brute force that are faster.
- OpenText question – Given an array having duplicate values, remove the duplicate values and also preserve the order without using any extra space.
- Ex: Input: [ 1, 3, 2, 3, 3, 4, 2, 1, 2 ] Output: [ 1, 3, 2, 4 ].
- Intuit question – Given a mathematical expression as a string, return an int computing the value of the expression.
- Ex: 1+3-6 = -2
- Palantir question – You have a set of (time, value) pairs. How can you find the first and last values in the time interval [a, b]?
- TripAdvisor question – Convert an integer with on bits corresponding to valid days of a week to strings of valid days.
- Explain bubble sort. Derive its time complexity.
- Docusign question – Write a function that will identify if a victory condition exists in a tic-tac-toe game.
- Coinbase question – Given a list of transactions between a group of friends (can be one person paying multiple people, multiple people paying one person and vice versa), calculate and print out how much money individuals owe one another. (Venmo essentially)
- Sort an array of integers such that all the zeroes are aligned to the left.
- Google question – Given a start and end position on a chessboard if you are only allowed to walk diagonally, how many steps do you need to take to get to the end position?
- Write a function to calculate x^a with x and a as parameters. Write it recursively
- Intuit question – Given a series of meeting times, find the time slot that is available to everyone.
- Dropbox question – You have a number of meetings (with their start and end times). You need to schedule them using the minimum number of rooms. Return the list of meetings in every room.
- Amazon question – Given a matrix of numbers. You start at left top corner and stop at right bottom corner. You can only move right or move down. Maximize the minimum number in the path.
- Facebook question – Retrieve words from a dictionary that are made up of a subsequence of characters in an input string
- Given input “ABAT,” matching words may include “BAT” and “TAB” while non-matching words may be “BART” or “BAR”).
- Given an array of objects of attendees for an event, return the date that most attendees of one country could attend the event.
- What is the difference between a primary key and a foreign key in a database?
- NCR question – What is the difference between union and union all in sql?
- What SQL columns should you index and how would you change the indexing in different lookup scenarios?
- What is the difference between “group by” and “order by”? Normalization and de-normalization? What are the pros and cons of each strategy?
- VMWare question – Implement a data structure that keeps track of 50 integers. How would you build this data structure to check if an element is present, and if the structure is full, remove the oldest element?
- What is a hash table?
- LinkedIn question – Implement a HashMap from scratch.
- Given a tree find shortest path between any two given nodes
- Apple question – Find the least common Ancestor of two nodes in a tree
- Detect a loop in a linked list.
- Intel question – How do you traverse a timing graph starting from the input nodes? Data structure of the nodes in the graph is given. Write a C program for it.
- How does a hash table work?
- What would you do if the collision happened?
- Snap question – Determine whether a graph is bipartite.
- How do you build a key value store?
- Adobe question – What is a concurrent hashmap and how does it work?
- Facebook question – What is a memory-efficient way to store a vector of integers?
- Follow-up question: using your proposed data structure, find an algorithm with constant memory usage to calculate the dot product of two vectors.
- What’s the time complexity of inserting? deleting? searching? What’s the time complexity for the worse case?
Low level systems
- What is the difference between thread and process?
- Intel question – Explain cache coherency in detail in a single core system and multi-core systems and how will you overcome the problem of data inconsistency in both those scenarios?
- What is the virtual memory?
- VMWare question – How can sliding window in TCP increase the network efficiency?
- HubSpot question – Name and explain the common HTTP request methods.
- Spotify question – Construct a distributed system that handles real time event processing
- Google question – Design an online battlefield game – What would be the protocols between the server and the client, the algorithms and game flow to decide the state of the game, and some basic networking.
- Netflix question – How would you efficiently send a 1GB of file over the network?
- Stripe question – How would you design, architect, and code a system that developers can use to run validity/correctness checks in production?
- Uber question – Design a system which suggests the orientations of all drivers when the user launches the app.
- Google question – How would Google transfer data between a phone and its cloud when it doesn’t own the cell tower?
- Docusign question – Write a solution to operate elevators in a 10 story building.
- Groupon question – Design a mobile app for college grades. How do you make it scalable?
- Uber question – Design a price surge system, both at a high level and the architecture.
- Amazon question – If you are a web administrator, and you receive an DDoS Attack, were there are “N millions” of hits at the same time, how do you avoid the servers going down?
More systems design
- Dropbox question – Design a link shortening URL system. Discuss the tradeoffs of different approaches.
- Groupon question – If you are starting a new business, how do you collect information about your new customers?
- Red Hat question – Write a script to clear the data older than x days from a location and send a verification email to the user group.
- Dell question – Implement a distributed lock for large-scale cluster.
- Google question – Design an access card system.
- LinkedIn question – Architect the LinkedIn home screen (feed) for the mobile app.
- Microsoft question – Design an old style mobile phone and search for various names based on key press
- Netflix question – How would you optimize network traffic for screen resolution?
- Oracle question – Design a banking transaction system that has services in New York, Tokyo and Bangalore. Each of them has a database at the location that only the server at the same location can access. Somehow, all the data in the 3 databases is always replicated. Build a system that will solve concurrency issues when a request from one user was received at all three servers at the same time.
- Constraints: The servers cannot forward requests to each other.
- They cannot access (or lock) each other’s databases.
- We cannot add more servers.
- We are not allowed any global timestamps.
- Salesforce question – How would you create a client-side application that would handle movie streaming services?
- Facebook question – How would you find out the number of cars passing on a busy bridge?
- TripAdvisor question – You have log outputs (potentially huge, out of order). Filter out only errors and count how many occurrences in each minute and output timestamp up to minutes + counts.
- Autodesk question – How do you code a calculator and debug it?
Object oriented programming
- Intel question – What are object inheritance and object composition?
- What is the difference between interface and abstract class?
- Design how you would rotate a drawing in a Java environment.
- Adobe question – Architect an object oriented design for a Connect 4 board game.
- HubSpot question – Design a URL shortener API, with metrics capturing and some optimization suggestions.
- What are all the verbs for a CRUD API?
- Slack question – Make a single-page app which read from an API, displayed the data on the page, and update the page without refreshing.
- The user should also be able to click on an entry and get an overlay with more details.
- The only technical limitation was to not use any frameworks.
- Stripe question – Design an API for tracking events in different clients
- How do you keep APIs secure? What are some considerations with API security?
- Salesforce question – What is a RESTful API?
- Slack question – Build a single page application image gallery, connecting to a public image api, and add lightbox functionality. Make it performant and cross-browser compatible.
- Autodesk question – Why can ++i be faster than i++?
- Teradata question – Are memory leaks possible in Java?
- Workday question – How do you enact garbage collection in Java?
- In Python, what is a generator?
- What’s the difference between a sealed class and an abstract class?
- Cisco question – What is a seg-fault? How is a seg-fault caused?
- Dell question – How many basketballs do you need to fill the room?
As a Pathrise mentor, I often meet with really smart and accomplished software engineers who have trouble with their technical interviews. So, I wanted to include some tips to help you if you are struggling during the interview as well.
Before diving in, ask clarifying questions
Sometimes, interviewers ask intentionally vague questions. Always take about 15-30 seconds to think about clarifying questions. Some examples are: “Are repetitions allowed?” or “Do you want to return permutations or combinations?”
Proactively show positive signal
This is a strong tactic used by candidates who want to reduce the amount of opportunities to show negative signal. The tradeoff is time, of course. But, in general, including 30 second “tidbits” of knowledge bodes well. For example, talk about runtime and space complexity proactively, but only if you are confident.
Make context statements
Context statements are the difference between doing something and providing the reasoning before doing something. If you give proper context. you can change the way you are interpreted for the better. So, if you are doing something that is opinionated action, provide the rationale behind it.
Know how to get help
Some interviewers just hate the word, “hint” so a better approach is to ask around the word. Instead, try saying, “my assumptions are X and Y, I’m thinking of doing Z. But I’m struggling with solving [problem].” You can also ask collaborative questions like,
- I was wondering if you had any thoughts.
- Do you think I’m going down the right direction?
- Do you think my assumptions are incorrect?
Ask the right kinds of questions
It’s important to ask common permission questions like, “Can I Google the syntax online?” or “Is it okay if I write some thoughts down on a pen and paper?” It’s also better if you tend towards closed questions such as, “should I code this solution or think of something more optimal?” versus “What should I do next?”
With these questions & tips in your back pocket, you should be more than prepared for your next technical onsite interview. Feel like you need more help? Check out these resources to practice more software engineering interview questions.
You can also review our other interview question lists:
- Java interview questions from top tech companies
- C# interview questions from top tech companies
- C interview questions from top tech companies
- Python interview questions from top tech companies
- Data science interview questions from top tech companies
Pathrise is a career accelerator that works with students and professionals 1-on-1 so they can land their dream job in tech. With these tips and guidance, fellows have seen their interview scores double.
If you want to work with any of our mentors 1-on-1 to get help with your software engineer interviews or with any other aspect of the job search, become a Pathrise fellow.