Skip to main content

Interview Questions

Review this list of 4,477 interview questions and answers verified by hiring managers and candidates.
  • Meta logoAsked at Meta 
    2 answers

    "class TreeNode(var val: Int, var left: TreeNode? = null, var right: TreeNode? = null) fun isAverageOfDescendants(root: TreeNode?): Boolean { fun helper(node: TreeNode?): Triple { if (node == null) return Triple(0, 0, true) val (leftSum, leftCount, leftValid) = helper(node.left) val (rightSum, rightCount, rightValid) = helper(node.right) val totalSum = leftSum + rightSum val totalCount = leftCount + rightCount // If leaf n"

    Gaurav B. - "class TreeNode(var val: Int, var left: TreeNode? = null, var right: TreeNode? = null) fun isAverageOfDescendants(root: TreeNode?): Boolean { fun helper(node: TreeNode?): Triple { if (node == null) return Triple(0, 0, true) val (leftSum, leftCount, leftValid) = helper(node.left) val (rightSum, rightCount, rightValid) = helper(node.right) val totalSum = leftSum + rightSum val totalCount = leftCount + rightCount // If leaf n"See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Amazon logoAsked at Amazon 
    6 answers
    +3

    "Approach (BFS + Horizontal Distance) Assign a horizontal distance (HD) to each node. Root → HD = 0 Left child → HD = parent HD - 1 Right child → HD = parent HD + 1 Do a BFS (level order traversal). If a node with a given HD is seen for the first time, add it to the result. Ignore later nodes with the same HD (because only the top one is visible). After traversal, sort by HD and print nodes left to righ"

    Firdous A. - "Approach (BFS + Horizontal Distance) Assign a horizontal distance (HD) to each node. Root → HD = 0 Left child → HD = parent HD - 1 Right child → HD = parent HD + 1 Do a BFS (level order traversal). If a node with a given HD is seen for the first time, add it to the result. Ignore later nodes with the same HD (because only the top one is visible). After traversal, sort by HD and print nodes left to righ"See full answer

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

    "Constraints: 4-direction moves; no mode switching (pick exactly one of {1=bicycle, 2=bike, 3=car, 4=bus} for the full trip). Per-mode search: If a mode’s per-step time/cost are uniform, run BFS on allowed cells. Then totaltime = steps × timeperstep, tie-break by steps × costper_step. If time/cost vary by cell (given matrices), run Dijkstra per mode minimizing (totaltime, totalcost) lexicographically. Maintain the best ⟨time, cost⟩ per cell; relax when the new pair is strictly better. S"

    Rahul J. - "Constraints: 4-direction moves; no mode switching (pick exactly one of {1=bicycle, 2=bike, 3=car, 4=bus} for the full trip). Per-mode search: If a mode’s per-step time/cost are uniform, run BFS on allowed cells. Then totaltime = steps × timeperstep, tie-break by steps × costper_step. If time/cost vary by cell (given matrices), run Dijkstra per mode minimizing (totaltime, totalcost) lexicographically. Maintain the best ⟨time, cost⟩ per cell; relax when the new pair is strictly better. S"See full answer

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

  • Meta logoAsked at Meta 
    6 answers
    +3

    "Each song has a playback event that stores information (region, timestamp, etc.) and push to real-time streaming platform and eventually lands into data storage where another service could consume is periodically(say every minute) to compute aggregate counts for the last 7 days. The system can then fetch the top 10 songs by sorting based on playback events using timestamp, optionally filtered by region or genre."

    Mathursan B. - "Each song has a playback event that stores information (region, timestamp, etc.) and push to real-time streaming platform and eventually lands into data storage where another service could consume is periodically(say every minute) to compute aggregate counts for the last 7 days. The system can then fetch the top 10 songs by sorting based on playback events using timestamp, optionally filtered by region or genre."See full answer

    Engineering Manager
    System Design
  • Product Manager
    Analytical
    +1 more
  • Google logoAsked at Google 
    1 answer

    "These are a set of utilities used to manage the heap memory as part of an application. The C standard library implements these functions. malloc(bytes) takes a number of bytes and returns a pointer to the start of the allocated buffer. If the allocation failed, a null pointer is returned instead. calloc(count, size) behaves like malloc(count * size), but also zero-initializes the allocated buffer, assuming the allocation succeeded. realloc(ptr, size) takes a pointer to a previously al"

    J R. - "These are a set of utilities used to manage the heap memory as part of an application. The C standard library implements these functions. malloc(bytes) takes a number of bytes and returns a pointer to the start of the allocated buffer. If the allocation failed, a null pointer is returned instead. calloc(count, size) behaves like malloc(count * size), but also zero-initializes the allocated buffer, assuming the allocation succeeded. realloc(ptr, size) takes a pointer to a previously al"See full answer

    Software Engineer
    Coding
    +1 more
  • Wells Fargo logoAsked at Wells Fargo 
    Add answer
    Product Manager
    Behavioral
  • Netflix logoAsked at Netflix 
    1 answer

    "CQs: Help? → any sort of help Customer support? On App guidance? Help for creators?developers? → no Currently it is FAQ based, predefined app guide for the new users, customer support for critical cases Any specific problem came out in research or want me to brainstorm → brainstorm Improve what? → CSAT - lagging metric, should not be only goal Time spent in on app help → key goal is reduce this No constraints Geo - US Users E"

    Sumit P. - "CQs: Help? → any sort of help Customer support? On App guidance? Help for creators?developers? → no Currently it is FAQ based, predefined app guide for the new users, customer support for critical cases Any specific problem came out in research or want me to brainstorm → brainstorm Improve what? → CSAT - lagging metric, should not be only goal Time spent in on app help → key goal is reduce this No constraints Geo - US Users E"See full answer

    Product Manager
    Product Design
  • Paytm logoAsked at Paytm 
    1 answer

    "CQs: Swiggy? → instamart or food delivery → consider both Why do we want to increase AOV right now? Is it not at the desired level or exploration? → let’s say exploration Swiggy is a public company → goal is profit Biggest bite in profit is delivery cost hence delivery cost/unit revenue should be minimised Delivery cost = (fixed base cost + distance * x) * probability of spoil cases Can be done by Lowering delivery cost → seems challenging "

    Sumit P. - "CQs: Swiggy? → instamart or food delivery → consider both Why do we want to increase AOV right now? Is it not at the desired level or exploration? → let’s say exploration Swiggy is a public company → goal is profit Biggest bite in profit is delivery cost hence delivery cost/unit revenue should be minimised Delivery cost = (fixed base cost + distance * x) * probability of spoil cases Can be done by Lowering delivery cost → seems challenging "See full answer

    Product Manager
    Product Strategy
  • Media.net logoAsked at Media.net 
    Add answer
    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Add answer
    Data Engineer
    Data Pipeline Design
  • Google logoAsked at Google 
    2 answers

    "Precision - Out of all the things we picked as correct, how many were actually correct? recall - Out of all the things that were truly correct, how many did we actually find?"

    Vineet M. - "Precision - Out of all the things we picked as correct, how many were actually correct? recall - Out of all the things that were truly correct, how many did we actually find?"See full answer

    Data Scientist
    Statistics & Experimentation
  • Capital One logoAsked at Capital One 
    2 answers

    "The mini case was very much interviewer led and the questions asked were following: Tell the value proposition of Capital One Shopping to a senior executive who has recently joined Capital One What factors would you consider to expand Capital One Shopping? Technical Considerations? AB testing analysis - Interviewer shared AB testing results and asked for my recommendation Summarize"

    Neha P. - "The mini case was very much interviewer led and the questions asked were following: Tell the value proposition of Capital One Shopping to a senior executive who has recently joined Capital One What factors would you consider to expand Capital One Shopping? Technical Considerations? AB testing analysis - Interviewer shared AB testing results and asked for my recommendation Summarize"See full answer

    Product Manager
    Product Strategy
  • Google logoAsked at Google 
    2 answers

    "Situation: At my previous company, we had more than 200 different data sources across 15 business units. These included CRM systems, marketing platforms, HR databases, and even third-party data feeds. The problem was that each team was managing data in its own way. This created inconsistent privacy controls, data quality issues, and compliance gaps, all of which were becoming urgent ahead of a major regulatory audit. Task: I was given the responsibility of implementing a unified data governance"

    Mark G. - "Situation: At my previous company, we had more than 200 different data sources across 15 business units. These included CRM systems, marketing platforms, HR databases, and even third-party data feeds. The problem was that each team was managing data in its own way. This created inconsistent privacy controls, data quality issues, and compliance gaps, all of which were becoming urgent ahead of a major regulatory audit. Task: I was given the responsibility of implementing a unified data governance"See full answer

    Technical Program Manager
    Program Sense
  • Yahoo logoAsked at Yahoo 
    1 answer

    "Open Oriented programming is a way to organize code around objects rather then functions."

    Yasir M. - "Open Oriented programming is a way to organize code around objects rather then functions."See full answer

    Software Engineer
    Concept
  • Meta logoAsked at Meta 
    Add answer
    Product Manager
    Analytical
  • Meta logoAsked at Meta 
    Add answer
    Product Manager
    Product Design
  • Meta logoAsked at Meta 
    Add answer
    Data Engineer
    Data Modeling
Showing 421-440 of 4477