Software Engineer Interview Questions

Review this list of 587 software engineer interview questions and answers verified by hiring managers and candidates.
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    +1

    " import lombok.*; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.stereotype.Component; import org.springframework.stereotype.Repository; import org.springframework.stereotype.Service; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java."

    Yash G. - " import lombok.*; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.stereotype.Component; import org.springframework.stereotype.Repository; import org.springframework.stereotype.Service; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java."See full answer

    Software Engineer
    System Design
    +2 more
  • Adobe logoAsked at Adobe 
    +7

    "function findPrimes(n) { if (n < 2) return []; const primes = []; for (let i=2; i <= n; i++) { const half = Math.floor(i/2); let isPrime = true; for (let prime of primes) { if (i % prime === 0) { isPrime = false; break; } } if (isPrime) { primes.push(i); } } return primes; } `"

    Tiago R. - "function findPrimes(n) { if (n < 2) return []; const primes = []; for (let i=2; i <= n; i++) { const half = Math.floor(i/2); let isPrime = true; for (let prime of primes) { if (i % prime === 0) { isPrime = false; break; } } if (isPrime) { primes.push(i); } } return primes; } `"See full answer

    Software Engineer
    Data Structures & Algorithms
    +4 more
  • OpenAI logoAsked at OpenAI 
    Software Engineer
    Behavioral
    +5 more
  • Microsoft logoAsked at Microsoft 
    +1

    "Approach 1: Use sorting and return the kth largest element from the sorted list. Time complexity: O(nlogn) Approach 2: Use max heap and then select the kth largest element. time complexity: O(n+logn) Approach 3: Quickselect. Time complexity O(n) I explained my interviewer the 3 approaches. He told me to solve in a naive manner. Used Approach 1 had some time left so coded approach 3 also The average time complexity of Quickselect is O(n), making it very efficient for its purpose. However, in"

    GalacticInterviewer - "Approach 1: Use sorting and return the kth largest element from the sorted list. Time complexity: O(nlogn) Approach 2: Use max heap and then select the kth largest element. time complexity: O(n+logn) Approach 3: Quickselect. Time complexity O(n) I explained my interviewer the 3 approaches. He told me to solve in a naive manner. Used Approach 1 had some time left so coded approach 3 also The average time complexity of Quickselect is O(n), making it very efficient for its purpose. However, in"See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Anthropic logoAsked at Anthropic 
    Software Engineer
    Behavioral
  • 🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.

  • Amazon logoAsked at Amazon 

    "input_logs = [ f"{senderid} {receiverid} {transaction_count}" "1 2 2", "3 2 42", "2 2 22", "1 1 12", "2 1 1", "2 5 4", "4 2 15" ] input_threshold = 20 exptected_output = [ list of user_ids that made more than 20 transactions sorted by number of transactions in descending order "3", # 42 transactions "2", # 27 transactions (22 + 1 + 4) #"4", # 15 transactions #"1" # 14 transactions (2 + 12 + 1) ] def gettopapi_users(logs, thres"

    Anonymous Unicorn - "input_logs = [ f"{senderid} {receiverid} {transaction_count}" "1 2 2", "3 2 42", "2 2 22", "1 1 12", "2 1 1", "2 5 4", "4 2 15" ] input_threshold = 20 exptected_output = [ list of user_ids that made more than 20 transactions sorted by number of transactions in descending order "3", # 42 transactions "2", # 27 transactions (22 + 1 + 4) #"4", # 15 transactions #"1" # 14 transactions (2 + 12 + 1) ] def gettopapi_users(logs, thres"See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Capital One logoAsked at Capital One 
    Software Engineer
    Data Structures & Algorithms
    +2 more
  • Software Engineer
    Behavioral
  • Meta (Facebook) logoAsked at Meta (Facebook) 

    "Given a Binary Tree, the task is to find its vertical traversal starting from the leftmost level to the rightmost level. If multiple nodes pass through a vertical line, they should be printed as they appear in the level order traversal of the tree. The idea is to traverse the tree using dfs and maintain a hashmap to store nodes at each horizontal distance (HD) from the root. Starting with an HD of 0 at the root, the HD is decremented for left children and incremented for right children. As we"

    Anonymous Mongoose - "Given a Binary Tree, the task is to find its vertical traversal starting from the leftmost level to the rightmost level. If multiple nodes pass through a vertical line, they should be printed as they appear in the level order traversal of the tree. The idea is to traverse the tree using dfs and maintain a hashmap to store nodes at each horizontal distance (HD) from the root. Starting with an HD of 0 at the root, the HD is decremented for left children and incremented for right children. As we"See full answer

    Software Engineer
    Data Structures & Algorithms
  • Stripe logoAsked at Stripe 

    "TCP server/client to facilitate high throughput of incoming metrics.(This is the standard used in the industry by Datadog etc). NoSQL or timeseries database for storing metrics. Timeseries databases are better for aggregating metrics in a given time period. REST API for serving metrics data to visualization frontend."

    Abhi R. - "TCP server/client to facilitate high throughput of incoming metrics.(This is the standard used in the industry by Datadog etc). NoSQL or timeseries database for storing metrics. Timeseries databases are better for aggregating metrics in a given time period. REST API for serving metrics data to visualization frontend."See full answer

    Software Engineer
    System Design
  • "Microsoft's mission is to empower every person and every organisation on the planet to achieve more. I am always inspired by helping others to achieve more by participating to different volunteer and mentorship experiences like Microsoft Student Ambassador, and GeeksForGeeks student ambassador, and I have also created and shared a free competitive-programming guide which once reached more than 700 stars on github, that enables students and professionals to join Microsoft like Microsoft, that hav"

    Davide P. - "Microsoft's mission is to empower every person and every organisation on the planet to achieve more. I am always inspired by helping others to achieve more by participating to different volunteer and mentorship experiences like Microsoft Student Ambassador, and GeeksForGeeks student ambassador, and I have also created and shared a free competitive-programming guide which once reached more than 700 stars on github, that enables students and professionals to join Microsoft like Microsoft, that hav"See full answer

    Software Engineer
    Behavioral
  • Anthropic logoAsked at Anthropic 

    "Yes to peer manager from stackholder team the problem was every time she wanted say something she used to have three way connect with me and my manager"

    Graig - "Yes to peer manager from stackholder team the problem was every time she wanted say something she used to have three way connect with me and my manager"See full answer

    Software Engineer
    Behavioral
    +3 more
  • Google logoAsked at Google 
    +7

    "Honestly, In addition to having the right expertise and skills required for this job, I am really looking forward to being part of this organisation’s journey. I am really confident that I will really exceed your expectations in achieving both mine and the company’s goals. I have worked with different teams in different capacities, managed a team of engineers successfully from very early part of my career and that has made me a very easy person to work with. I get things done easily. I am passio"

    Piyush D. - "Honestly, In addition to having the right expertise and skills required for this job, I am really looking forward to being part of this organisation’s journey. I am really confident that I will really exceed your expectations in achieving both mine and the company’s goals. I have worked with different teams in different capacities, managed a team of engineers successfully from very early part of my career and that has made me a very easy person to work with. I get things done easily. I am passio"See full answer

    Software Engineer
    Behavioral
    +2 more
  • Amazon logoAsked at Amazon 
    Video answer for 'How do you consider the impact of your work on the world?'
    +12

    "this is not a helpful interview, she seems so unprepared, confusing, unable to netting it out :("

    Anonymous Giraffe - "this is not a helpful interview, she seems so unprepared, confusing, unable to netting it out :("See full answer

    Software Engineer
    Behavioral
    +3 more
  • "/* You are with your friends in a castle, where there are multiple rooms named after flowers. Some of the rooms contain treasures - we call them the treasure rooms. Each room contains a single instruction that tells you which room to go to next. * instructions1 and treasurerooms_1 * lily* --------- daisy sunflower | | | v v v jasmin --> tulip* violet* ----> rose* --> ^ | ^ ^ | "

    Azeezat R. - "/* You are with your friends in a castle, where there are multiple rooms named after flowers. Some of the rooms contain treasures - we call them the treasure rooms. Each room contains a single instruction that tells you which room to go to next. * instructions1 and treasurerooms_1 * lily* --------- daisy sunflower | | | v v v jasmin --> tulip* violet* ----> rose* --> ^ | ^ ^ | "See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • "Clarifying questions: is this a brand new product, or are we improving an existing one? (i.e. are we going to have to migrate an existing codebase or are we starting from scratch?). are we resource-strapped (e.g. # engineers, time)? are there any specific priorities for the product, or should i leave it open-ended? Assume: brand new product, well-resourced, no specific priorities. It seems that there are two sides to this question: 1) technical evaluation of different languages, and 2)"

    Laura S. - "Clarifying questions: is this a brand new product, or are we improving an existing one? (i.e. are we going to have to migrate an existing codebase or are we starting from scratch?). are we resource-strapped (e.g. # engineers, time)? are there any specific priorities for the product, or should i leave it open-ended? Assume: brand new product, well-resourced, no specific priorities. It seems that there are two sides to this question: 1) technical evaluation of different languages, and 2)"See full answer

    Software Engineer
    Technical
  • Amazon logoAsked at Amazon 
    +1

    "Ask Follow up Questions Is this for specific type of user or open? Do we have any past research that has been done? Do we have an idea of company and user goals? Do we have metrics of success? Are there any existing constraints? Why  |  5 min Why is this product or feature important? How does this product benefit customers? What business opportunities does it create? What is our hypothesis? What are our company goals? Who  |  3 min Who are the different types"

    Ben G. - "Ask Follow up Questions Is this for specific type of user or open? Do we have any past research that has been done? Do we have an idea of company and user goals? Do we have metrics of success? Are there any existing constraints? Why  |  5 min Why is this product or feature important? How does this product benefit customers? What business opportunities does it create? What is our hypothesis? What are our company goals? Who  |  3 min Who are the different types"See full answer

    Software Engineer
    Product Design
    +1 more
  • DoorDash logoAsked at DoorDash 

    "The reason I want to work at Doordash is because I’m a really hard worker, I never give up and I’m good at delivering stuff to my teachers at school whenever they have something to drop off to them, I look at the paper and then I read the directions given to me on the ipad to drop it off."

    Amparo L. - "The reason I want to work at Doordash is because I’m a really hard worker, I never give up and I’m good at delivering stuff to my teachers at school whenever they have something to drop off to them, I look at the paper and then I read the directions given to me on the ipad to drop it off."See full answer

    Software Engineer
    Behavioral
    +1 more
  • Adobe logoAsked at Adobe 
    Video answer for 'Generate Parentheses'
    +5

    "function generateParentheses(n) { if (n < 1) { return []; } if (n === 1) { return ["()"]; } const combinations = new Set(); let previousCombinations = generateParentheses(n-1); for (let prev of previousCombinations) { for (let i=0; i < prev.length; i++) { combinations.add(prev.slice(0, i+1) + "()" + prev.slice(i+1)); } } return [...combinations]; } `"

    Tiago R. - "function generateParentheses(n) { if (n < 1) { return []; } if (n === 1) { return ["()"]; } const combinations = new Set(); let previousCombinations = generateParentheses(n-1); for (let prev of previousCombinations) { for (let i=0; i < prev.length; i++) { combinations.add(prev.slice(0, i+1) + "()" + prev.slice(i+1)); } } return [...combinations]; } `"See full answer

    Software Engineer
    Data Structures & Algorithms
    +3 more
Showing 241-260 of 587