Interview Questions

Review this list of 3,944 interview questions and answers verified by hiring managers and candidates.
  • Amazon logoAsked at Amazon 

    "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
  • New York Times logoAsked at New York Times 

    "input = [ {"topic": 1, "chapter": 1, "section": 1}, {"topic": 2, "chapter": 2, "section": 1}, {"topic": 3, "chapter": 2, "section": 2}, {"topic": 4, "chapter": 1, "section": 1}, {"topic": 5, "chapter": 1, "section": 1}, {"topic": 6, "chapter": 2, "section": 2}, {"topic": 7, "chapter": 2, "section": 2}, {"topic": 8, "chapter": 2, "section": 3}, ] expected_output = [ {'chapter': 1, 'sections': [ {'section': 1, 'topics': [ {'top"

    Anonymous Unicorn - "input = [ {"topic": 1, "chapter": 1, "section": 1}, {"topic": 2, "chapter": 2, "section": 1}, {"topic": 3, "chapter": 2, "section": 2}, {"topic": 4, "chapter": 1, "section": 1}, {"topic": 5, "chapter": 1, "section": 1}, {"topic": 6, "chapter": 2, "section": 2}, {"topic": 7, "chapter": 2, "section": 2}, {"topic": 8, "chapter": 2, "section": 3}, ] expected_output = [ {'chapter': 1, 'sections': [ {'section': 1, 'topics': [ {'top"See full answer

    Software Engineer
    Coding
    +1 more
  • "naive solution: def countprefixpairs(words): n = len(words) count = 0 for i in range(n): for j in range(i + 1, n): if words[i].startswith(words[j]) or words[j].startswith(words[i]): count += 1 return count using tries for when the list of words is very long: from collections import Counter class TrieNode: def init(self): self.children = {} self.count = 0 # To count the number of words ending at this node"

    Anonymous Unicorn - "naive solution: def countprefixpairs(words): n = len(words) count = 0 for i in range(n): for j in range(i + 1, n): if words[i].startswith(words[j]) or words[j].startswith(words[i]): count += 1 return count using tries for when the list of words is very long: from collections import Counter class TrieNode: def init(self): self.children = {} self.count = 0 # To count the number of words ending at this node"See full answer

    Software Engineer
    Coding
  • Uber Eats logoAsked at Uber Eats 

    "Objective: Migrate from subscription base business revenue model to ads based revenue model. Continue with subscription base revenue model, showcase ads on platform only. (Not in between the content). Continue with subscription base revenue model, showcase ads on platform and in between content. Provide different monthly plans based on with ads or without ads Increase revenue by X% - Decide based on this object what revenue model to accept. Assumption: Netflix wants to continue"

    dungeonMaster - "Objective: Migrate from subscription base business revenue model to ads based revenue model. Continue with subscription base revenue model, showcase ads on platform only. (Not in between the content). Continue with subscription base revenue model, showcase ads on platform and in between content. Provide different monthly plans based on with ads or without ads Increase revenue by X% - Decide based on this object what revenue model to accept. Assumption: Netflix wants to continue"See full answer

    Product Manager
    Product Design
  • Capital One logoAsked at Capital One 

    "C++ : vector justifywords(const vector& wordslist, int width) { vector result; string curr_line = ""; for (const string& word : words_list) { if (currline.length() + word.length() + (currline.empty() ? 0 : 1) > width) { result.pushback(currline); curr_line = ""; // Reset current line } if (!curr_line.empty()) { curr_line += " "; } curr_line += word; } if"

    Anonymous Basilisk - "C++ : vector justifywords(const vector& wordslist, int width) { vector result; string curr_line = ""; for (const string& word : words_list) { if (currline.length() + word.length() + (currline.empty() ? 0 : 1) > width) { result.pushback(currline); curr_line = ""; // Reset current line } if (!curr_line.empty()) { curr_line += " "; } curr_line += word; } if"See full answer

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

  • +2

    "Initialise a Stack: Use a stack to keep track of the indices of unmatched opening parentheses. Iterate through the String: Traverse the string character by character:If an opening parenthesis '(' is found, push its index onto the stack. If a closing parenthesis ')' is found; check if there’s a corresponding opening parenthesis in the stack. If so, pop the index from the stack (indicating a valid pair). If not, mark this closing parenthesis for removal. Mark Unmatched Parentheses: Aft"

    Vidhyadhar V. - "Initialise a Stack: Use a stack to keep track of the indices of unmatched opening parentheses. Iterate through the String: Traverse the string character by character:If an opening parenthesis '(' is found, push its index onto the stack. If a closing parenthesis ')' is found; check if there’s a corresponding opening parenthesis in the stack. If so, pop the index from the stack (indicating a valid pair). If not, mark this closing parenthesis for removal. Mark Unmatched Parentheses: Aft"See full answer

    Machine Learning Engineer
    Data Structures & Algorithms
    +2 more
  • +8

    "Used Recursive approach to traverse the binary search tree and sum the values of the nodes that fall within the specified range [low, high]"

    Srikant V. - "Used Recursive approach to traverse the binary search tree and sum the values of the nodes that fall within the specified range [low, high]"See full answer

    Software Engineer
    Coding
    +1 more
  • Software Engineer
    Coding
    +1 more
  • Software Engineer
    Data Structures & Algorithms
    +1 more
  • "ArrayList allows constant time access (O(1)) to elements using their index because it uses a dynamic array internally, whereas LinkedList requires traversal from the head node, resulting in linear time complexity (O(n))."

    Aziz V. - "ArrayList allows constant time access (O(1)) to elements using their index because it uses a dynamic array internally, whereas LinkedList requires traversal from the head node, resulting in linear time complexity (O(n))."See full answer

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

    "Step 1: Clarifying the Problem Scope We will focus on designing the leaderboard for Dream11 with these assumptions: Registered teams: 100,000 users are actively participating and ranked. Real-time updates: Leaderboard updates frequently as players accumulate points based on live sports events. Multiple leagues: Each user can participate in different leagues, so we will need to maintain a separate leaderboard for each league. Query efficiency: Users frequently"

    Ramendra S. - "Step 1: Clarifying the Problem Scope We will focus on designing the leaderboard for Dream11 with these assumptions: Registered teams: 100,000 users are actively participating and ranked. Real-time updates: Leaderboard updates frequently as players accumulate points based on live sports events. Multiple leagues: Each user can participate in different leagues, so we will need to maintain a separate leaderboard for each league. Query efficiency: Users frequently"See full answer

    Engineering Manager
    System Design
  • Flipkart logoAsked at Flipkart 

    " Describe the product -What does it do? Who uses it? How do they use it? Google maps provides an optimal route from point A to point B. It also shows different checkpoints like restaurants, petrol pumps, etc. on the way. It is used in two major ways majorly, before starting people check the traffic to decide when to leave or which route to take. When people don’t know the way so they put on Google map to guide them. It has 1Bn MAU and 152 mins of app time. Clarification questions Wha"

    Ekta M. - " Describe the product -What does it do? Who uses it? How do they use it? Google maps provides an optimal route from point A to point B. It also shows different checkpoints like restaurants, petrol pumps, etc. on the way. It is used in two major ways majorly, before starting people check the traffic to decide when to leave or which route to take. When people don’t know the way so they put on Google map to guide them. It has 1Bn MAU and 152 mins of app time. Clarification questions Wha"See full answer

    Product Manager
    Product Strategy
  • Flipkart logoAsked at Flipkart 

    "Instagram is social media app where you can share photo and video to others. Impressions is an important metrics to track because it shows how many contents that users see. Clarify Questions: Is this drop happen suddenly or gradually? - Gradually How long has it been happening? - Last 3 months Is it happen globally or in certain region? - Globally Is the drop happen to all user segments (age, new/existing, active/less active users)? - all user segments When calculating an impressions,"

    Nayla D. - "Instagram is social media app where you can share photo and video to others. Impressions is an important metrics to track because it shows how many contents that users see. Clarify Questions: Is this drop happen suddenly or gradually? - Gradually How long has it been happening? - Last 3 months Is it happen globally or in certain region? - Globally Is the drop happen to all user segments (age, new/existing, active/less active users)? - all user segments When calculating an impressions,"See full answer

    Product Manager
    Analytical
    +1 more
  • Flipkart logoAsked at Flipkart 

    " Why do we want to increase the price? How much do we need to increase? Is it tied to some kind of revenue target? What is the region in which price needs to be increased? - Say India Who are the major players in that region who offer similar services and how are they priced? Will the users switch to those competitors? What is our unique proposition for retention? Do we have any leverage against them which will stop the users from churning? Any change in pricing or anything major like terms an"

    Ekta M. - " Why do we want to increase the price? How much do we need to increase? Is it tied to some kind of revenue target? What is the region in which price needs to be increased? - Say India Who are the major players in that region who offer similar services and how are they priced? Will the users switch to those competitors? What is our unique proposition for retention? Do we have any leverage against them which will stop the users from churning? Any change in pricing or anything major like terms an"See full answer

    Product Manager
    Product Strategy
  • Amazon logoAsked at Amazon 
    +19

    "Firstly, it's mentioned "ideas" & not "idea". I would like to get more context. Is it one idea or multiple ideas on a roadmap? Is it tied to the same broader goal? Is this a pattern where team has been disagreeing with ideas for a while? If it's the 1st, then it's fine, we can look into it. If it's the 2nd, then it raises a bit of a concern. Gonna assume it's the 1st. I'd probably get clarity by asking questions To the team: Which idea/s are being disagreed upon? Are all member"

    Debajyoti B. - "Firstly, it's mentioned "ideas" & not "idea". I would like to get more context. Is it one idea or multiple ideas on a roadmap? Is it tied to the same broader goal? Is this a pattern where team has been disagreeing with ideas for a while? If it's the 1st, then it's fine, we can look into it. If it's the 2nd, then it raises a bit of a concern. Gonna assume it's the 1st. I'd probably get clarity by asking questions To the team: Which idea/s are being disagreed upon? Are all member"See full answer

    Product Manager
    Behavioral
  • Apple logoAsked at Apple 

    "Situation : During my time in my previous company, I was leading a program which involved a cross-functional team. The project was to migrate all the legacy servers to Azure and had a tight deadline of 4 months. Each team had distinct goals and responsibilites to be delivered Task : My task was to collaborate with the multi regional team and ensure a smooth delivery within the defined budget and schedule. Action : I believe communication is the key to handle a cross-functional team"

    Oriole O. - "Situation : During my time in my previous company, I was leading a program which involved a cross-functional team. The project was to migrate all the legacy servers to Azure and had a tight deadline of 4 months. Each team had distinct goals and responsibilites to be delivered Task : My task was to collaborate with the multi regional team and ensure a smooth delivery within the defined budget and schedule. Action : I believe communication is the key to handle a cross-functional team"See full answer

    Technical Program Manager
    Behavioral
  • VMware logoAsked at VMware 

    "This doesn't look like a product design question. This is more of a system design question, no?"

    S S. - "This doesn't look like a product design question. This is more of a system design question, no?"See full answer

    Product Manager
    Product Design
    +1 more
  • Product Manager
    Product Strategy
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    +8

    "Clarify: Feature for group messages and not individual messages The feature will be primarily used for Whatsapp and not other Meta products - Instagram, FB We are looking to improve engagement with this feature User: Pro users Users with moderate usage Users with no/little usage Prioritize - Users with no/little usage - as this user base could be greatly impacted Pain points: Too many messages are sent to the group and important messages are lost. Multiple message popp"

    Sahil A. - "Clarify: Feature for group messages and not individual messages The feature will be primarily used for Whatsapp and not other Meta products - Instagram, FB We are looking to improve engagement with this feature User: Pro users Users with moderate usage Users with no/little usage Prioritize - Users with no/little usage - as this user base could be greatly impacted Pain points: Too many messages are sent to the group and important messages are lost. Multiple message popp"See full answer

    Product Manager
    Product Design
Showing 801-820 of 3944