# 93 software engineer interview questions from top tech companies [Updated 2023]

## Updated in 2023

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.

### Software engineer interview questions

#### Algorithms

1. Find all the combinations of a string in lowercase and uppercase.
1. For example, string “ab” “ab”, “Ab”, “aB”, “AB”
2. Airbnb questionYou 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.
1. Input: [1, 2, 3]; output: 4, because you will pick 1 and 3
2. Input: [5, 1, 2, 6]; output: 11, because you will pick 5 and 6
3. Input: [5, 1, 2, 6, 20, 2]; output: 27, because you will pick 5, 2, 20
3. Implement a circular buffer using an array.
4. Write a function to detect if a string is a palindrome
5. Twitter questionGiven 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[0][0] to M[n-1][n-1]. You can move either up, down, left or right.
6. How do you reverse a linked list?
7. Apple questionGiven 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.
8. Given an amount of money (such as \$1.32), return the minimum number of coins needed to make that change.
9. Intel questionGiven 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).
10. Microsoft questionRemove duplicates from an integer array (unsorted)
11. Write a function to find the middle of a linked list. Use it to perform merge sort on a linked list.
##### More algorithms
1. Palantir questionIf 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.
2. OpenText questionGiven an array having duplicate values, remove the duplicate values and also preserve the order without using any extra space.
1. Ex: Input: [ 1, 3, 2, 3, 3, 4, 2, 1, 2 ] Output: [ 1, 3, 2, 4 ].
3. Intuit questionGiven a mathematical expression as a string, return an int computing the value of the expression.
1. Ex: 1+3-6 = -2
4. Palantir questionYou have a set of (time, value) pairs. How can you find the first and last values in the time interval [a, b]?
5. TripAdvisor questionConvert an integer with on bits corresponding to valid days of a week to strings of valid days.
6. Explain bubble sort. Derive its time complexity.
7. Docusign questionWrite a function that will identify if a victory condition exists in a tic-tac-toe game.
8. Coinbase questionGiven 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)
9. Sort an array of integers such that all the zeroes are aligned to the left.
10. Google questionGiven 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?
11. Write a function to calculate x^a with x and a as parameters. Write it recursively
12. Intuit questionGiven a series of meeting times, find the time slot that is available to everyone.
##### Final algorithms
1. Dropbox questionYou 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.
2. Amazon questionGiven 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.
3. Facebook questionRetrieve words from a dictionary that are made up of a subsequence of characters in an input string
1. Given input “ABAT,” matching words may include “BAT” and “TAB” while non-matching words may be “BART” or “BAR”).
4. Given an array of objects of attendees for an event, return the date that most attendees of one country could attend the event.

#### SQL

1. What is the difference between a primary key and a foreign key in a database?
2. NCR questionWhat is the difference between union and union all in sql?
3. What SQL columns should you index and how would you change the indexing in different lookup scenarios?
4. What is the difference between “group by” and “order by”? Normalization and de-normalization? What are the pros and cons of each strategy?

#### Data structures

1. VMWare questionImplement 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?
2. What is a hash table?
3. LinkedIn questionImplement a HashMap from scratch.
4. Given a tree find shortest path between any two given nodes
5. Apple questionFind the least common Ancestor of two nodes in a tree
6. Detect a loop in a linked list.
7. 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.
8. How does a hash table work?
9. What would you do if the collision happened?
10. Snap questionDetermine whether a graph is bipartite.
11. How do you build a key value store?
12. Adobe question What is a concurrent hashmap and how does it work?
13. Facebook questionWhat is a memory-efficient way to store a vector of integers?
1. Follow-up question: using your proposed data structure, find an algorithm with constant memory usage to calculate the dot product of two vectors.
14. What’s the time complexity of inserting? deleting? searching? What’s the time complexity for the worse case?

#### Low level systems

1. What is the difference between thread and process?
2. Intel questionExplain 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?
3. What is the virtual memory?

#### Networking

1. VMWare questionHow can sliding window in TCP increase the network efficiency?
2. HubSpot questionName and explain the common HTTP request methods.

#### Systems design

1. Spotify questionConstruct a distributed system that handles real time event processing
2. Google questionDesign 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.
3. Netflix question – How would you efficiently send a 1GB of file over the network?
4. Stripe questionHow would you design, architect, and code a system that developers can use to run validity/correctness checks in production?
5. Uber question Design a system which suggests the orientations of all drivers when the user launches the app.
6. Google questionHow would Google transfer data between a phone and its cloud when it doesn’t own the cell tower?
7. Docusign questionWrite a solution to operate elevators in a 10 story building.
8. Groupon questionDesign a mobile app for college grades. How do you make it scalable?
9. Uber questionDesign a price surge system, both at a high level and the architecture.
10. Amazon questionIf 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
1. Dropbox questionDesign a link shortening URL system. Discuss the tradeoffs of different approaches.
2. Groupon questionIf you are starting a new business, how do you collect information about your new customers?
3. Red Hat questionWrite a script to clear the data older than x days from a location and send a verification email to the user group.
4. Dell questionImplement a distributed lock for large-scale cluster.
5. Google question Design an access card system.
6. LinkedIn question –  Architect the LinkedIn home screen (feed) for the mobile app.
7. Microsoft questionDesign an old style mobile phone and search for various names based on key press
8. Netflix questionHow would you optimize network traffic for screen resolution?
9. Oracle questionDesign 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.
1. Constraints: The servers cannot forward requests to each other.
2. They cannot access (or lock) each other’s databases.
3. We cannot add more servers.
4. We are not allowed any global timestamps.
10. Salesforce questionHow would you create a client-side application that would handle movie streaming services?
11. Facebook question – How would you find out the number of cars passing on a busy bridge?
12. TripAdvisor questionYou 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.
13. Autodesk questionHow do you code a calculator and debug it?

#### Object oriented programming

1. Intel questionWhat are object inheritance and object composition?
2. What is the difference between interface and abstract class?
3. Design how you would rotate a drawing in a Java environment.
4. Adobe questionArchitect an object oriented design for a Connect 4 board game.

#### APIs

1. HubSpot questionDesign a URL shortener API, with metrics capturing and some optimization suggestions.
2. What are all the verbs for a CRUD API?
3. Slack questionMake a single-page app which read from an API, displayed the data on the page, and update the page without refreshing.
1. The user should also be able to click on an entry and get an overlay with more details.
2. The only technical limitation was to not use any frameworks.
4. Stripe questionDesign an API for tracking events in different clients
5. How do you keep APIs secure? What are some considerations with API security?
6. Salesforce questionWhat is a RESTful API?

#### Front-end

1. Pinterest questionDescribe how you would manually write (CSS, JavaScript, HTML) to create the infinite grid UI that Pinterest uses on its homepage.
2. Slack questionBuild a single page application image gallery, connecting to a public image api, and add lightbox functionality. Make it performant and cross-browser compatible.

#### Language trivia

1. Autodesk questionWhy can ++i be faster than i++?
2. Teradata questionAre memory leaks possible in Java?
3. Workday questionHow do you enact garbage collection in Java?
4. In Python, what is a generator?
5. What’s the difference between a sealed class and an abstract class?
6. Cisco questionWhat is a seg-fault? How is a seg-fault caused?

#### Logic/critical thinking

1. Dell questionHow 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: