Software Engineer Interview Questions

Review this list of 467 software engineer interview questions and answers verified by hiring managers and candidates.
  • Apple logoAsked at Apple 

    "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
  • Apple logoAsked at Apple 
    Software Engineer
    System Design
  • Microsoft logoAsked at Microsoft 
    Video answer for 'Find the number of rotations in a circularly sorted array.'
    +8

    "function countRotations(arr, low, high) { if (high low && arr[mid] arr[mid]) { return countRotations(arr, low, mid - 1); } return countRotations(arr, mid + 1, high); } "

    Ugo C. - "function countRotations(arr, low, high) { if (high low && arr[mid] arr[mid]) { return countRotations(arr, low, mid - 1); } return countRotations(arr, mid + 1, high); } "See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Adobe logoAsked at Adobe 
    +5

    "bool isValidBST(TreeNode* root, long min = LONGMIN, long max = LONGMAX){ if (root == NULL) return true; if (root->val val >= max) return false; return isValidBST(root->left, min, root->val) && isValidBST(root->right, root->val, max); } `"

    Alvaro R. - "bool isValidBST(TreeNode* root, long min = LONGMIN, long max = LONGMAX){ if (root == NULL) return true; if (root->val val >= max) return false; return isValidBST(root->left, min, root->val) && isValidBST(root->right, root->val, max); } `"See full answer

    Software Engineer
    Coding
    +4 more
  • Amazon logoAsked at Amazon 

    "no"

    Hamilton D. - "no"See full answer

    Software Engineer
    Technical
    +1 more
  • 🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.

  • Nvidia logoAsked at Nvidia 
    Software Engineer
    Behavioral
    +1 more
  • Notion logoAsked at Notion 
    Software Engineer
    System Design
  • Amazon logoAsked at Amazon 

    "Whenever I find resistance to my idea, my general approach is to : Validate my idea Identify if it is a political reason or is it a valid engineering tech reason Assuming it is not political but it is resource/difference of opinions that are causing resistance. Then I would try to do a quick POC and show a value proposition for the idea to get the buy-in. One similar situation happened The situation was that stakeholders were promised a feature that would decrease their number of ticket"

    Jaim - "Whenever I find resistance to my idea, my general approach is to : Validate my idea Identify if it is a political reason or is it a valid engineering tech reason Assuming it is not political but it is resource/difference of opinions that are causing resistance. Then I would try to do a quick POC and show a value proposition for the idea to get the buy-in. One similar situation happened The situation was that stakeholders were promised a feature that would decrease their number of ticket"See full answer

    Software Engineer
    Behavioral
    +1 more
  • Apple logoAsked at Apple 
    +2

    "This could be done using two-pointer approach assuming array is sorted: left and right pointers. We need track two sums (left and right) as we move pointers. For moving pointers we will move left to right by 1 (increment) when right sum is greater. We will move right pointer to left by 1 (decrement) when left sum is greater. at some point we will either get the sum same and that's when we exit from the loop. 0-left will be one array and right-(n-1) will be another array. We are not going to mo"

    Bhaskar B. - "This could be done using two-pointer approach assuming array is sorted: left and right pointers. We need track two sums (left and right) as we move pointers. For moving pointers we will move left to right by 1 (increment) when right sum is greater. We will move right pointer to left by 1 (decrement) when left sum is greater. at some point we will either get the sum same and that's when we exit from the loop. 0-left will be one array and right-(n-1) will be another array. We are not going to mo"See full answer

    Software Engineer
    Data Structures & Algorithms
    +2 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
    Coding
    +1 more
  • Dropbox logoAsked at Dropbox 

    "Project Schedule is a living document which is prepared based on inputs from the entire team including product, engineering, finance, sales, marketing, legal etc. It is owned by Project/Program Manager but it reflects progress of the whole team. Inputs required for the development of schedule includes project charter, list of stakeholders, project scope, WBS, freeze calendar, vendor SOWs etc. I will use the following approach for schedule development: Copy Milestone level plan from Project"

    Saket S. - "Project Schedule is a living document which is prepared based on inputs from the entire team including product, engineering, finance, sales, marketing, legal etc. It is owned by Project/Program Manager but it reflects progress of the whole team. Inputs required for the development of schedule includes project charter, list of stakeholders, project scope, WBS, freeze calendar, vendor SOWs etc. I will use the following approach for schedule development: Copy Milestone level plan from Project"See full answer

    Software Engineer
    Program Sense
  • "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
  • Amazon logoAsked at Amazon 
    Software Engineer
    Behavioral
  • Google logoAsked at Google 
    Software Engineer
    Behavioral
  • Adobe logoAsked at Adobe 
    +2

    "function main(){ const v1=[2,3, 4, 10] const v2= [3,4 ,5,20, 23] return merge(v1,v2); } function merge(left, right){ const result=[]; while(left.length>0&& right.length>0){ if(left[0]0){ result=result.concat(left) } if(right.length>0){ result=result.concat(right) } return result; }"

    Samuel M. - "function main(){ const v1=[2,3, 4, 10] const v2= [3,4 ,5,20, 23] return merge(v1,v2); } function merge(left, right){ const result=[]; while(left.length>0&& right.length>0){ if(left[0]0){ result=result.concat(left) } if(right.length>0){ result=result.concat(right) } return result; }"See full answer

    Software Engineer
    Data Structures & Algorithms
    +4 more
  • "Depend on the array size and number of 0's theere."

    Nasit S. - "Depend on the array size and number of 0's theere."See full answer

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

    "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
  • Lyft logoAsked at Lyft 
    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Amazon logoAsked at Amazon 
    Software Engineer
    Behavioral
    +1 more
Showing 261-280 of 467