Skip to main content

Recent Software Engineer Interview Questions

Review this list of 650 Software Engineer interview questions and answers verified by hiring managers and candidates.
  • Accenture logoAsked at Accenture 
    2 answers

    "encapsulation is a way in oops to hide or protect class properties and methods from unauthorized access. It keep class members and methods in a single unit."

    Ujagar S. - "encapsulation is a way in oops to hide or protect class properties and methods from unauthorized access. It keep class members and methods in a single unit."See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • "import java.util.*; public class NetworkTopology { public int topologytype(int N, int M, int[] input3, int[] input4) { if (M != N - 1 && M != N) return -1; // Fast check for invalid cases int[] degree = new int[N + 1]; // Degree of each node (1-based indexing) // Build the degree array for (int i = 0; i < M; i++) { degree[input3[i]]++; degree[input4[i]]++; } // Check for Bus Topology boolean isBus = (M"

    Alessandro R. - "import java.util.*; public class NetworkTopology { public int topologytype(int N, int M, int[] input3, int[] input4) { if (M != N - 1 && M != N) return -1; // Fast check for invalid cases int[] degree = new int[N + 1]; // Degree of each node (1-based indexing) // Build the degree array for (int i = 0; i < M; i++) { degree[input3[i]]++; degree[input4[i]]++; } // Check for Bus Topology boolean isBus = (M"See full answer

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

    "Thanks for the question! This is one of my favourite topics because it’s at the core of what we do as PMs DAILY: making the complex simple to drive alignment. I’ve got a structured way to approach this, and I’ll use it to explain payment aggregators - like Plaid - and how they enable Open Banking, with a twist about a technical hiccup I’ve seen in practice. Let’s dive in. I start by assessing the audience. Say I’m talking to a marketing manager at Transak - someone sharp but not techni"

    Adarsh S. - "Thanks for the question! This is one of my favourite topics because it’s at the core of what we do as PMs DAILY: making the complex simple to drive alignment. I’ve got a structured way to approach this, and I’ll use it to explain payment aggregators - like Plaid - and how they enable Open Banking, with a twist about a technical hiccup I’ve seen in practice. Let’s dive in. I start by assessing the audience. Say I’m talking to a marketing manager at Transak - someone sharp but not techni"See full answer

    Software Engineer
    Behavioral
    +3 more
  • "Batch Packing Problem In Amazon’s massive warehouse inventory, there are different types of products. You are given an array products of size n, where products[i] represents the number of items of product type i. These products need to be packed into batches for shipping. The batch packing must adhere to the following conditions: No two items in the same batch can be of the same product type. The number of items packed in the current batch must be strictly greater than the number pack"

    Anonymous Goat - "Batch Packing Problem In Amazon’s massive warehouse inventory, there are different types of products. You are given an array products of size n, where products[i] represents the number of items of product type i. These products need to be packed into batches for shipping. The batch packing must adhere to the following conditions: No two items in the same batch can be of the same product type. The number of items packed in the current batch must be strictly greater than the number pack"See full answer

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

    "So here is what I would do if I had to designing a system to log messages in order involves several considerations, including the choice of software, hardware, storage mechanisms, and scalability. Here’s how I would approach this: 1. Requirements Analysis: Message Format: Define the structure of the messages to log (e.g., text, JSON). Volume: Estimate the expected volume of messages per second. This will help in determining the infrastructure requirements. **Order Guarantee"

    Theodore (teddy) W. - "So here is what I would do if I had to designing a system to log messages in order involves several considerations, including the choice of software, hardware, storage mechanisms, and scalability. Here’s how I would approach this: 1. Requirements Analysis: Message Format: Define the structure of the messages to log (e.g., text, JSON). Volume: Estimate the expected volume of messages per second. This will help in determining the infrastructure requirements. **Order Guarantee"See full answer

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

  • Amazon logoAsked at Amazon 
    2 answers

    "The interviewer was interested how the system design would be for files, directories, symbolic links. After proposing my idea, I was asked to print all files for a given path."

    B. T. - "The interviewer was interested how the system design would be for files, directories, symbolic links. After proposing my idea, I was asked to print all files for a given path."See full answer

    Software Engineer
    System Design
  • Microsoft logoAsked at Microsoft 
    1 answer

    "You are given a string S and a number K as input, and your task is to print S to console output considering that, at most, you can print K characters per line. Example: S = "abracadabra sample" K = 11 Output: abracadabra sample Note that this problem requires the interviewee gather extra requirements from the interviewer (e.g. do we care about multiple white spaces? what if the length of a word is greater than K, ...)"

    B. T. - "You are given a string S and a number K as input, and your task is to print S to console output considering that, at most, you can print K characters per line. Example: S = "abracadabra sample" K = 11 Output: abracadabra sample Note that this problem requires the interviewee gather extra requirements from the interviewer (e.g. do we care about multiple white spaces? what if the length of a word is greater than K, ...)"See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • "Example: bucket A: 3 liters capacity bucket B: 5 liters capacity goal: 4 liters You are asked to print the logical sequence to get to the 4 liters of water in one bucket. Follow up: How would you solve the problem if you have more than 2 buckets of water?"

    B. T. - "Example: bucket A: 3 liters capacity bucket B: 5 liters capacity goal: 4 liters You are asked to print the logical sequence to get to the 4 liters of water in one bucket. Follow up: How would you solve the problem if you have more than 2 buckets of water?"See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • "Use Dutch National Flag Algorithm to solve the problem"

    Sireesha R. - "Use Dutch National Flag Algorithm to solve the problem"See full answer

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

    "I think AI such as ChatGPT seemed to spit out its answers fast and instinctively, hence proving its efficiency but in the recent versions it seems to have acquired reasoning skills which was revealed 'transparently' to users. This new, reasoning skills introduce a small delay in its response and explains what it does during the delay but I do not really think that it is "thinking" any differently than before, except that it is constrained by some purported rules when asked to summarise certain b"

    Louisa C. - "I think AI such as ChatGPT seemed to spit out its answers fast and instinctively, hence proving its efficiency but in the recent versions it seems to have acquired reasoning skills which was revealed 'transparently' to users. This new, reasoning skills introduce a small delay in its response and explains what it does during the delay but I do not really think that it is "thinking" any differently than before, except that it is constrained by some purported rules when asked to summarise certain b"See full answer

    Software Engineer
    Behavioral
    +1 more
  • Infosys logoAsked at Infosys 
    1 answer

    "In Java, GC is the process of automatically identifying and reclaming memory occupied by objects that are no longer reachable.. the process involves the 3 steps Mark phase -- identify the objects that are still in use. i.e reachable sweep Phase -- removes the unreachable objects compact phase -- rearragnes objects to prevent fragmentation 4 types of Garbage collection Serial GC -- single threaded simple and compacting -- best for small applications Parrallel GC -- throughput GC"

    Sue G. - "In Java, GC is the process of automatically identifying and reclaming memory occupied by objects that are no longer reachable.. the process involves the 3 steps Mark phase -- identify the objects that are still in use. i.e reachable sweep Phase -- removes the unreachable objects compact phase -- rearragnes objects to prevent fragmentation 4 types of Garbage collection Serial GC -- single threaded simple and compacting -- best for small applications Parrallel GC -- throughput GC"See full answer

    Software Engineer
    Concept
  • Meta logoAsked at Meta 
    1 answer

    "I talked about a time that my manager had a better understanding of something than me and that I had to start to ask him what he knew about a certain type of thing once I was getting work assigned"

    Anonymous Cheetah - "I talked about a time that my manager had a better understanding of something than me and that I had to start to ask him what he knew about a certain type of thing once I was getting work assigned"See full answer

    Software Engineer
    Behavioral
    +1 more
  • Amazon logoAsked at Amazon 
    Add answer
    Software Engineer
    Behavioral
    +1 more
  • Meta logoAsked at Meta 
    5 answers
    +2

    "Implemented a recursive function which returns the length of the list so far. when the returned value equals k + 1 , assign current.next = current.next.next. If I made it back to the head return root.next as the new head of the linked list."

    דניאל ר. - "Implemented a recursive function which returns the length of the list so far. when the returned value equals k + 1 , assign current.next = current.next.next. If I made it back to the head return root.next as the new head of the linked list."See full answer

    Software Engineer
    Data Structures & Algorithms
    +2 more
  • Goldman Sachs logoAsked at Goldman Sachs 
    Add answer
    Software Engineer
    System Design
  • "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
  • "import java.util.Stack; public class EfficientParentheses { public static int maxEfficientValidParentheses(String s, int[] efficiency) { Stack stack = new Stack(); int totalEfficiency = 0; boolean[] used = new boolean[s.length()]; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) == '(') { stack.push(i); } else if (s.charAt(i) == ')') { if (!stack.isEmpty()) { int ma"

    Khushbu R. - "import java.util.Stack; public class EfficientParentheses { public static int maxEfficientValidParentheses(String s, int[] efficiency) { Stack stack = new Stack(); int totalEfficiency = 0; boolean[] used = new boolean[s.length()]; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) == '(') { stack.push(i); } else if (s.charAt(i) == ')') { if (!stack.isEmpty()) { int ma"See full answer

    Software Engineer
    Coding
  • Amazon logoAsked at Amazon 
    4 answers
    +1

    "1. Requirements Analysis Functional Requirements Video streaming with multiple quality levels Content browsing and search Continue watching functionality Content recommendations Non-Functional Requirements Low latency video delivery (<2s startup time) High availability (99.99% uptime) Scalability to handle millions of concurrent streams API response time < 100ms 2. Microservices Architecture Core Microservices Content Service Content metadata mana"

    Reno S. - "1. Requirements Analysis Functional Requirements Video streaming with multiple quality levels Content browsing and search Continue watching functionality Content recommendations Non-Functional Requirements Low latency video delivery (<2s startup time) High availability (99.99% uptime) Scalability to handle millions of concurrent streams API response time < 100ms 2. Microservices Architecture Core Microservices Content Service Content metadata mana"See full answer

    Software Engineer
    System Design
  • Amazon logoAsked at Amazon 
    1 answer

    "S – Situation: In a university project, my team was building a collaborative code editor. As part of the functionality, we needed a login system so users could securely access their sessions and collaborate in real time. T – Task: I was responsible for implementing the authentication system. Initially, I planned to build the entire login system from scratch, including user management, password storage, and session handling. But as the deadline approached, I realized that implementing thi"

    Hamzeh H. - "S – Situation: In a university project, my team was building a collaborative code editor. As part of the functionality, we needed a login system so users could securely access their sessions and collaborate in real time. T – Task: I was responsible for implementing the authentication system. Initially, I planned to build the entire login system from scratch, including user management, password storage, and session handling. But as the deadline approached, I realized that implementing thi"See full answer

    Software Engineer
    Behavioral
  • Apple logoAsked at Apple 
    Add answer
    Software Engineer
    Data Structures & Algorithms
    +1 more
Showing 201-220 of 650