Software Engineer Interview Questions

Review this list of 467 software engineer interview questions and answers verified by hiring managers and candidates.
  • Adobe logoAsked at Adobe 
    Video answer for 'Given stock prices for the next n days, how can you maximize your profit by buying or selling one share per day?'
    +9

    "from typing import List def maxprofitgreedy(stock_prices: List[int]) -> int: l=0 # buying r=1 # selling max_profit=0 while rstock_prices[l]: profit=stockprices[r]-stockprices[l] maxprofit=max(maxprofit,profit) else: l=r r+=1 return max_profit debug your code below print(maxprofitgreedy([7, 1, 5, 3, 6, 4])) `"

    Prajwal M. - "from typing import List def maxprofitgreedy(stock_prices: List[int]) -> int: l=0 # buying r=1 # selling max_profit=0 while rstock_prices[l]: profit=stockprices[r]-stockprices[l] maxprofit=max(maxprofit,profit) else: l=r r+=1 return max_profit debug your code below print(maxprofitgreedy([7, 1, 5, 3, 6, 4])) `"See full answer

    Software Engineer
    Data Structures & Algorithms
    +4 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 

    "I tried solving this question and here is the recorded video for the entire solution - https://youtu.be/G_LIbTp58XA Feel free to comment here or on the video for further discussion."

    Rjj - "I tried solving this question and here is the recorded video for the entire solution - https://youtu.be/G_LIbTp58XA Feel free to comment here or on the video for further discussion."See full answer

    Software Engineer
    System Design
    +2 more
  • Software Engineer
    Behavioral
  • "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
  • "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
    Coding
    +1 more
  • 🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.

  • Adobe logoAsked at Adobe 
    Software Engineer
    Data Structures & Algorithms
    +4 more
  • Apple logoAsked at Apple 
    +9

    "class ListNode: def init(self, val=0, next=None): self.val = val self.next = next def has_cycle(head: ListNode) -> bool: slow, fast = head, head while fast and fast.next: slow = slow.next fast = fast.next.next if slow == fast: return True return False debug your code below node1 = ListNode(1) node2 = ListNode(2) node3 = ListNode(3) node4 = ListNode(4) creates a linked list with a cycle: 1 -> 2 -> 3 -> 4"

    Anonymous Roadrunner - "class ListNode: def init(self, val=0, next=None): self.val = val self.next = next def has_cycle(head: ListNode) -> bool: slow, fast = head, head while fast and fast.next: slow = slow.next fast = fast.next.next if slow == fast: return True return False debug your code below node1 = ListNode(1) node2 = ListNode(2) node3 = ListNode(3) node4 = ListNode(4) creates a linked list with a cycle: 1 -> 2 -> 3 -> 4"See full answer

    Software Engineer
    Data Structures & Algorithms
    +4 more
  • 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
  • TikTok logoAsked at TikTok 

    "I aim to utilize hands-on activities to apply the knowledge I've acquired, safeguard the organization from threat actors, and contribute to its growth."

    Bravin V. - "I aim to utilize hands-on activities to apply the knowledge I've acquired, safeguard the organization from threat actors, and contribute to its growth."See full answer

    Software Engineer
    Behavioral
  • "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
  • "BETWEEN and HAVING clauses in SQL serve different purposes: 1. BETWEEN Clause Used to filter rows based on a range of values. Works with numeric, date, or text values. Can be used with WHERE or HAVING clauses. The range includes both lower and upper bounds. Example: Filtering employees with salaries between 30,000 and 50,000 `SELECT * FROM Employees WHERE salary BETWEEN 30000 AND 50000;` 2. HAVING Clause Used to filter **groups"

    Meenakshi D. - "BETWEEN and HAVING clauses in SQL serve different purposes: 1. BETWEEN Clause Used to filter rows based on a range of values. Works with numeric, date, or text values. Can be used with WHERE or HAVING clauses. The range includes both lower and upper bounds. Example: Filtering employees with salaries between 30,000 and 50,000 `SELECT * FROM Employees WHERE salary BETWEEN 30000 AND 50000;` 2. HAVING Clause Used to filter **groups"See full answer

    Software Engineer
    Concept
    +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 
    +1

    "const ops = { '+': (a, b) => a+b, '-': (a, b) => a-b, '/': (a, b) => a/b, '': (a, b) => ab, }; function calc(expr) { // Search for + or - for (let i=expr.length-1; i >= 0; i--) { const char = expr.charAt(i); if (['+', '-'].includes(char)) { return opschar), calc(expr.slice(i+1))); } } // Search for / or * for (let i=expr.length-1; i >= 0; i--) { const char = expr.charAt(i); if"

    Tiago R. - "const ops = { '+': (a, b) => a+b, '-': (a, b) => a-b, '/': (a, b) => a/b, '': (a, b) => ab, }; function calc(expr) { // Search for + or - for (let i=expr.length-1; i >= 0; i--) { const char = expr.charAt(i); if (['+', '-'].includes(char)) { return opschar), calc(expr.slice(i+1))); } } // Search for / or * for (let i=expr.length-1; i >= 0; i--) { const char = expr.charAt(i); if"See full answer

    Software Engineer
    Data Structures & Algorithms
    +3 more
  • Capital One logoAsked at Capital One 
    Software Engineer
    Data Structures & Algorithms
    +2 more
  • Amazon logoAsked at Amazon 
    Video answer for 'How do you consider the impact of your work on the world?'
    +11

    "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
    +4 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
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    Software Engineer
    Behavioral
    +1 more
  • Adobe logoAsked at Adobe 
    +37

    "function twoSum(nums, target) { let complements = new Map(); for (let i = 0; i < nums.length; i++) { let diff = target - nums[i]; if (complements.has(diff)) { return [complements.get(diff), i]; } complements.set(nums[i], i); } return []; } console.log(twoSum([2, 7, 11, 15], 9)); `"

    Jean-pierre C. - "function twoSum(nums, target) { let complements = new Map(); for (let i = 0; i < nums.length; i++) { let diff = target - nums[i]; if (complements.has(diff)) { return [complements.get(diff), i]; } complements.set(nums[i], i); } return []; } console.log(twoSum([2, 7, 11, 15], 9)); `"See full answer

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

    "Functional Requirement Monitor health, metrics Alert in case of failure/anomaly Visualize the live health Analyse machines on periodic basis Non Functional Should not exert load on machines low latency Highly scalable Logs/Metrics Gathering push - machine gather and send to system and low priority background thread along with batching pull - heart beat check (for offline machines) Processing Real time streaming using Kafka/kinesis + Flink TimeSeries database for stor"

    Sourabh G. - "Functional Requirement Monitor health, metrics Alert in case of failure/anomaly Visualize the live health Analyse machines on periodic basis Non Functional Should not exert load on machines low latency Highly scalable Logs/Metrics Gathering push - machine gather and send to system and low priority background thread along with batching pull - heart beat check (for offline machines) Processing Real time streaming using Kafka/kinesis + Flink TimeSeries database for stor"See full answer

    Software Engineer
    System Design
    +2 more
Showing 181-200 of 467