Photo of software engineer interview question prep

93 software engineer interview questions to nail your onsite

Hi, I’m Brian, a former senior software engineer and now software engineering advisor at Pathrise. I work with hundreds of software engineers to help them land their dream job.

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 the 93 most asked software engineer interview questions so you can prepare for your interview and come in with confidence.

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. Example:
    2. 1) Input: [1, 2, 3]; output: 4, because you will pick 1 and 3
    3. 2) input: [5, 1, 2, 6]; output: 11, because you will pick 5 and 6
    4. 3) input: [5, 1, 2, 6, 20, 2]; output: 27, because you will pick 5, 2, 20
  3. Given an amount of money (such as $1.32), return the minimum number of coins needed to make that change.
  4. Implement a circular buffer using an array.
  5. Write a function to detect if a string is a palindrome
  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. 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).
  9. Microsoft questionRemove duplicates from an integer array (unsorted)
  10. Write a function to find the middle of a linked list. Use it to perform merge sort on a linked list.
  11. 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.
  12. 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 ].
  13. Sort an array of integers such that all the zeroes are aligned to the left.
  14. Intuit questionGiven a mathematical expression as a string, return an int computing the value of the expression.
    1. Ex: 1+3-6 = -2
  15. Palantir questionYou have a set of (time, value) pairs. How can you find the first and last values in the time interval [a, b]?
  16. 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.
  17. TripAdvisor questionConvert an integer with on bits corresponding to valid days of a week to strings of valid days.
  18. Explain bubble sort. Derive its time complexity.
  19. Write a function to calculate x^a with x and a as parameters. Write it recursively
  20. Docusign questionWrite a function that will identify if a victory condition exists in a tic-tac-toe game.
  21. 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?
  22. Intuit questionGiven a series of meeting times, find the time slot that is available to everyone.
  23. 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.
  24. Given an array of objects of attendees for an event, return the date that most attendees of one country could attend the event.
  25. 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)
  26. 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.
  27. 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”).

SQL

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

Data structures

  1. Given a tree find shortest path between any two given nodes
  2. Apple questionFind the least common Ancestor of two nodes in a tree
  3. Detect a loop in a linked list.
  4. 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.
  5. 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?
  6. Snap questionDetermine whether a graph is bipartite.  
  7. What is a hash table?
  8. How does a hash table work?
  9. What would you do if the collision happened?
  10. What’s the time complexity of inserting? deleting? searching? What’s the time complexity for the worse case?
  11. LinkedIn questionImplement a HashMap from scratch.
  12. How do you build a key value store?
  13. Adobe question What is a concurrent hashmap and how does it work?
  14. 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.

Low level systems

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

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. 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.
  2. Netflix question – How would you efficiently send a 1GB of file over the network?
  3. Spotify questionConstruct a distributed system that handles real time event processing
  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. 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?
  8. Groupon questionDesign a mobile app for college grades. How do you make it scalable?
  9. Dropbox questionDesign a link shortening URL system. Discuss the tradeoffs of different approaches.
  10. 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.
  11. Dell questionImplement a distributed lock for large-scale cluster.
  12. Facebook question – How would you find out the number of cars passing on a busy bridge?
  13. Google question Design an access card system.
  14. LinkedIn question –  Architect the LinkedIn home screen (feed) for the mobile app.
  15. Microsoft questionDesign an old style mobile phone and search for various names based on key press
  16. Netflix questionHow would you optimize network traffic for screen resolution?
  17. 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.
  18. Salesforce questionHow would you create a client-side application that would handle movie streaming services?
  19. Uber questionDesign a price surge system, both at a high level and the architecture.
  20. 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.
  21. Groupon questionIf you are starting a new business, how do you collect information about your new customers?
  22. Autodesk questionHow do you code a calculator and debug it?
  23. Docusign questionWrite a solution to operate elevators in a 10 story building.

Object oriented programming

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

API questions

  1. What are all the verbs for a CRUD API?
  2. Salesforce questionWhat is a RESTful 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. HubSpot questionDesign a URL shortener API, with metrics capturing and some optimization suggestions.

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. Cisco questionWhat is a seg-fault? How is a seg-fault caused?
  3. Teradata questionAre memory leaks possible in Java?
  4. Workday questionHow do you enact garbage collection in Java?
  5. In Python, what is a generator?
  6. What’s the difference between a sealed class and an abstract class?

Logic/critical thinking

  1. Dell questionHow many basketballs do you need to fill the room?

Our advisors at Pathrise often meet with really smart and accomplished software engineers who have trouble with their technical interviews so also have some tips to help you if you’re struggling during the interview

  • Before diving in, ask clarifying questions

Sometimes, interviewers make a question intentionally vague. Always take about 15-30 seconds to think about clarifying questions, like “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, but in general 30 second “tidbits” of knowledge bodes well. For example, talk about runtime and space complexity proactively, if you are confident.

  • Make context statements

Context statements are the difference between doing something and providing the reasoning before doing something. How you are interpreted can very much change based on the context that you give. So, if you are doing something that is opinionated action, provide the rationale for it.

  • Know how to get help

Some interviewers just hate the word, “hint” so a better approach is to say, “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 best 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 ended 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.


Pathrise is a career accelerator that works with students and young professionals 1-on-1 so they can land their dream job in tech. With these tips and guidance, fellows have seen their interview performance scores double.

If you want to work with any of our advisors 1-on-1 to get help with your software engineer interviews or with any other aspect of the job search, become a Pathrise fellow.

Apply today


Leave a Reply

Your email address will not be published. Required fields are marked *