Skip to main content

Top Software Engineer Interview Questions

Review this list of 715 Software Engineer interview questions and answers verified by hiring managers and candidates.
  • Uber logoAsked at Uber 
    1 answer

    "''' Problem Statement: Design a simplified Robinhood-like stock trading platform. Requirements: User Management: createuser(userid, name, initial_balance): Create user with cash balance getbalance(userid): Get user's cash balance deposit(user_id, amount): Add funds to account withdraw(user_id, amount): Withdraw funds (if sufficient balance) Stock Operations: updatestockprice(symbol, price): Update current price of a stock getstockprice(symb"

    Rahul .. - "''' Problem Statement: Design a simplified Robinhood-like stock trading platform. Requirements: User Management: createuser(userid, name, initial_balance): Create user with cash balance getbalance(userid): Get user's cash balance deposit(user_id, amount): Add funds to account withdraw(user_id, amount): Withdraw funds (if sufficient balance) Stock Operations: updatestockprice(symbol, price): Update current price of a stock getstockprice(symb"See full answer

    Software Engineer
    System Design
  • Apple logoAsked at Apple 
    3 answers

    "class TrieNode { constructor() { this.children = {}; this.isEndOfWord = false; } } class Trie { constructor() { this.root = new TrieNode(); } insert(word) { let node = this.root; for (const char of word) { if (!node.children[char]) { node.children[char] = new TrieNode(); } node = node.children[char]; } node.isEndOfWord = true; } search(word) { l"

    Tiago R. - "class TrieNode { constructor() { this.children = {}; this.isEndOfWord = false; } } class Trie { constructor() { this.root = new TrieNode(); } insert(word) { let node = this.root; for (const char of word) { if (!node.children[char]) { node.children[char] = new TrieNode(); } node = node.children[char]; } node.isEndOfWord = true; } search(word) { l"See full answer

    Software Engineer
    Data Structures & Algorithms
    +4 more
  • Apple logoAsked at Apple 
    1 answer

    "A red-black tree is a self-balancing binary search tree. The motivation for this is that the benefits of O(logN) search, insertion, and deletion that a binary tree provides us will disappear if we let the tree get too "imbalanced" (e.g. there are too many nodes on one side of the tree or some branches have a depth that is way out of proportion to the average branch depth). This imbalance will occur if we don't adjust the tree after inserting or deleting nodes, hence our need for self-balancing c"

    Alex M. - "A red-black tree is a self-balancing binary search tree. The motivation for this is that the benefits of O(logN) search, insertion, and deletion that a binary tree provides us will disappear if we let the tree get too "imbalanced" (e.g. there are too many nodes on one side of the tree or some branches have a depth that is way out of proportion to the average branch depth). This imbalance will occur if we don't adjust the tree after inserting or deleting nodes, hence our need for self-balancing c"See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • "Steps in booking (eg. movie ticket booking) User logs in User enters details User selects seats User adds meal options User enters payment method User completes payment Scenarios Which can happen agents corner the tickets and then sell them at premium Multiple users booking at the same time and get an error message at the end Money gets stuck and will be refunded later Load at the server and server crashes Multiple users get t"

    P D. - "Steps in booking (eg. movie ticket booking) User logs in User enters details User selects seats User adds meal options User enters payment method User completes payment Scenarios Which can happen agents corner the tickets and then sell them at premium Multiple users booking at the same time and get an error message at the end Money gets stuck and will be refunded later Load at the server and server crashes Multiple users get t"See full answer

    Software Engineer
    Product Design
  • 🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.

  • "MOD = 10**9 + 7 def max_stability(reliability, availability): max_stability = 1 for r, a in zip(reliability, availability): Compute stability of the current server stability = r * a if stability != 0: Multiply into max_stability and take modulo maxstability = (maxstability * stability) % MOD return max_stability reliability = [1, 2, 2] availability = [1, 1, 3] print(max_stability(reliability, availability)) # Output the result mo"

    K.nithish K. - "MOD = 10**9 + 7 def max_stability(reliability, availability): max_stability = 1 for r, a in zip(reliability, availability): Compute stability of the current server stability = r * a if stability != 0: Multiply into max_stability and take modulo maxstability = (maxstability * stability) % MOD return max_stability reliability = [1, 2, 2] availability = [1, 1, 3] print(max_stability(reliability, availability)) # Output the result mo"See full answer

    Software Engineer
    Coding
  • Canva logoAsked at Canva 
    1 answer

    "3.3 years , java and Angular Full stack developer "

    Prakash K. - "3.3 years , java and Angular Full stack developer "See full answer

    Software Engineer
    Behavioral
  • Amazon logoAsked at Amazon 
    1 answer

    "Count items between indices within compartments compartments are delineated by by: '|' items are identified by: '*' input_inventory = "*||||" inputstartidxs = [1, 4, 6] inputendidxs = [9, 5, 8] expected_output = [3, 0, 1] Explanation: "*||||" 0123456789... indices ++ + # within compartments ^ start_idx = 1 ^ end_idx = 9 -- - # within idxs but not within compartments "*||||" 0123456789... indices "

    Anonymous Unicorn - "Count items between indices within compartments compartments are delineated by by: '|' items are identified by: '*' input_inventory = "*||||" inputstartidxs = [1, 4, 6] inputendidxs = [9, 5, 8] expected_output = [3, 0, 1] Explanation: "*||||" 0123456789... indices ++ + # within compartments ^ start_idx = 1 ^ end_idx = 9 -- - # within idxs but not within compartments "*||||" 0123456789... indices "See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Google logoAsked at Google 
    2 answers

    "There are three stages in the React lifecycle: mount, update, and unmount. The mount stage runs once when the component is loaded on the page. The update stage runs whenever the data that passes to the component, like props or state, changes. Finally, the unmount stage runs when the component is removed from the page, a.k.a. the cleanup stage. The useEffect hook can be used to track these stages, and it runs once right after the mount stage; it updates based on the data passed to the dependency"

    Juan moises T. - "There are three stages in the React lifecycle: mount, update, and unmount. The mount stage runs once when the component is loaded on the page. The update stage runs whenever the data that passes to the component, like props or state, changes. Finally, the unmount stage runs when the component is removed from the page, a.k.a. the cleanup stage. The useEffect hook can be used to track these stages, and it runs once right after the mount stage; it updates based on the data passed to the dependency"See full answer

    Software Engineer
    Concept
  • LinkedIn logoAsked at LinkedIn 
    3 answers

    " #include #include using namespace std; int numOfGeneOccurnces(string dnaSequence, string geneSequence) { if(dnaSequence.size() == 0 || geneSequence.size() == 0) { return 0; } int numOcc = 0; for(int i = 0; i <= (int)dnaSequence.size() - (int)geneSequence.size(); i++) { if(dnaSequence.substr(i, (int)geneSequence.size()) == geneSequence) { numOcc++; } } return numOcc; } int main() { return 0; } `"

    Alok S. - " #include #include using namespace std; int numOfGeneOccurnces(string dnaSequence, string geneSequence) { if(dnaSequence.size() == 0 || geneSequence.size() == 0) { return 0; } int numOcc = 0; for(int i = 0; i <= (int)dnaSequence.size() - (int)geneSequence.size(); i++) { if(dnaSequence.substr(i, (int)geneSequence.size()) == geneSequence) { numOcc++; } } return numOcc; } int main() { return 0; } `"See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Amazon logoAsked at Amazon 
    1 answer

    "Front Page Layout Design for Newspaper App Header Section Logo: Displays at the top left. App Name: Displays alongside, so very prominent. Search Bar: Centered with search to find articles within the application. Navigation Menu: The links to the respective sections, World, Politics, Sports, Entertainment, and Opinion, etc Main Content Area Top Stories Carousel: It is a rotating banner that displays the top 3-5 news stories with images along with their headlines. Each story should be cl"

    Midde V. - "Front Page Layout Design for Newspaper App Header Section Logo: Displays at the top left. App Name: Displays alongside, so very prominent. Search Bar: Centered with search to find articles within the application. Navigation Menu: The links to the respective sections, World, Politics, Sports, Entertainment, and Opinion, etc Main Content Area Top Stories Carousel: It is a rotating banner that displays the top 3-5 news stories with images along with their headlines. Each story should be cl"See full answer

    Software Engineer
    Product Design
    +1 more
  • Snap logoAsked at Snap 
    3 answers

    "I wrote a function to determine if a given number is a power of 2 using logarithms."

    Susheel C. - "I wrote a function to determine if a given number is a power of 2 using logarithms."See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Software Engineer
    Coding
  • 1 answer

    " Broke down the problem in this: Features scope API design Pseudo code for specific components Data model/schema Back-of-the-envelope calculations Reference links Link to whiteboard or diagram such as https://sketchboard.me/new Good luck! Considerations: Content could be potential large Older content should clean from the server URL: Pastebin.com/2324234 Features Scope: user can paste any text content .TXT, .HTML Limit on the amount content compress data and send over"

    Ayo A. - " Broke down the problem in this: Features scope API design Pseudo code for specific components Data model/schema Back-of-the-envelope calculations Reference links Link to whiteboard or diagram such as https://sketchboard.me/new Good luck! Considerations: Content could be potential large Older content should clean from the server URL: Pastebin.com/2324234 Features Scope: user can paste any text content .TXT, .HTML Limit on the amount content compress data and send over"See full answer

    Software Engineer
    Product Design
    +1 more
  • Apple logoAsked at Apple 
    Add answer
    Software Engineer
    Data Structures & Algorithms
    +4 more
  • "def mostefficientseqscore(parentheses, efficiencyratings): mes = [] for i in range(len(parentheses)): mes.append((parentheses[i], max(efficiency_ratings[i])) return sum([m[1] for m in mes]) `"

    Nathan C. - "def mostefficientseqscore(parentheses, efficiencyratings): mes = [] for i in range(len(parentheses)): mes.append((parentheses[i], max(efficiency_ratings[i])) return sum([m[1] for m in mes]) `"See full answer

    Software Engineer
    Coding
  • Software Engineer
    Behavioral
    +2 more
  • Anthropic logoAsked at Anthropic 
    Add answer
    Software Engineer
    Behavioral
  • 1 answer

    "Understood the problem statement by confirming details with interviewer. Approached by listing down all the basic features being provided by the platform. Platform -> Organizations can register themselves. One org can have more than one recruiters. Recruiters create jobs on the org portal. Candidate can apply to the jobs. Recruiters can accept and reject the applications. Categorized 4 parent tables by taking hints in between. The tables were USER -> ID, Name, Phone No, mail ID, Profile Des.("

    Jaya S. - "Understood the problem statement by confirming details with interviewer. Approached by listing down all the basic features being provided by the platform. Platform -> Organizations can register themselves. One org can have more than one recruiters. Recruiters create jobs on the org portal. Candidate can apply to the jobs. Recruiters can accept and reject the applications. Categorized 4 parent tables by taking hints in between. The tables were USER -> ID, Name, Phone No, mail ID, Profile Des.("See full answer

    Software Engineer
    System Design
  • Google logoAsked at Google 
    2 answers

    "I would assume that this is similar to an intervals question. Meeting Rooms II (https://www.lintcode.com/problem/919/?fromId=203&_from=collection) on Leetcode seems like the closest comparison, it's a premium question so I linked Lintcode. I'm assuming that we also need to just return the minimum number of cars used. You need to sort for the most optimal solution, so you're constrained by an O(nlogn) time complexity. So any sorting solution could work (using a heap, sorting the array input arra"

    Sohum S. - "I would assume that this is similar to an intervals question. Meeting Rooms II (https://www.lintcode.com/problem/919/?fromId=203&_from=collection) on Leetcode seems like the closest comparison, it's a premium question so I linked Lintcode. I'm assuming that we also need to just return the minimum number of cars used. You need to sort for the most optimal solution, so you're constrained by an O(nlogn) time complexity. So any sorting solution could work (using a heap, sorting the array input arra"See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
Showing 361-380 of 715
Exponent

Get updates in your inbox with the latest tips, job listings, and more.

Follow Us

Products
Courses
Interview Questions
Interview Experiences
Popular articles
Guides
Coaching
For Partners
Company
Exponent © 2026
Terms of Service | Privacy