Interview Questions

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

    " This is mostly correct and fairly fast. My code has a bug somewhere where it fails on cases like the last case, where there are negative number on both ends of the array and the sums . from collections import deque debug = True # False def prdbg(*x): global debug debug = True # False if debug: print(x) else: return def max_sum(arr, start, end): if type(arr) == type(''' "

    Nathan B. - " This is mostly correct and fairly fast. My code has a bug somewhere where it fails on cases like the last case, where there are negative number on both ends of the array and the sums . from collections import deque debug = True # False def prdbg(*x): global debug debug = True # False if debug: print(x) else: return def max_sum(arr, start, end): if type(arr) == type(''' "See full answer

    Data Structures & Algorithms
    Coding
  • 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
  • Adobe logoAsked at Adobe 
    Video answer for 'Move all zeros to the end of an array.'
    +46

    "Initialize left pointer: Set a left pointer left to 0. Iterate through the array: Iterate through the array from left to right. If the current element is not 0, swap it with the element at the left pointer and increment left. Time complexity: O(n). The loop iterates through the entire array once, making it linear time. Space complexity: O(1). The algorithm operates in-place, modifying the input array directly without using additional data structures. "

    Avon T. - "Initialize left pointer: Set a left pointer left to 0. Iterate through the array: Iterate through the array from left to right. If the current element is not 0, swap it with the element at the left pointer and increment left. Time complexity: O(n). The loop iterates through the entire array once, making it linear time. Space complexity: O(1). The algorithm operates in-place, modifying the input array directly without using additional data structures. "See full answer

    Machine Learning Engineer
    Data Structures & Algorithms
    +4 more
  • Amazon logoAsked at Amazon 
    +8

    "Questions to ask : Are there negative values in the input array? Interview : YES Will the product of two number fit into 32-bit Integer. If not, will it fit 64-bit Integer. If not, then is it safe to use Big Integer? Interview : let's worry only about 32 bit Integer What should we return if the input array is null or size (size of input array) is less than 2? Return 0 From above Information: General approach is as follows : a) Track smallest 2 elements in the array -> p"

    Rajendra D. - "Questions to ask : Are there negative values in the input array? Interview : YES Will the product of two number fit into 32-bit Integer. If not, will it fit 64-bit Integer. If not, then is it safe to use Big Integer? Interview : let's worry only about 32 bit Integer What should we return if the input array is null or size (size of input array) is less than 2? Return 0 From above Information: General approach is as follows : a) Track smallest 2 elements in the array -> p"See full answer

    Data Structures & Algorithms
    Coding
  • 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
  • 🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.

  • Adobe logoAsked at Adobe 

    "simply check its size if the size if the size is greater than n then yes it has duplicate"

    Kunal kumar S. - "simply check its size if the size if the size is greater than n then yes it has duplicate"See full answer

    Machine Learning Engineer
    Data Structures & Algorithms
    +2 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 

    "sum of continuous subarray and keep checking if arr[i]==arr[j]. if true increase count;"

    Rishabh R. - "sum of continuous subarray and keep checking if arr[i]==arr[j]. if true increase count;"See full answer

    Data Structures & Algorithms
    Coding
    +1 more
  • Google logoAsked at Google 
    Video answer for 'How would you debug a failing NUC in a data center?'

    "what is NUC? "

    Astro S. - "what is NUC? "See full answer

    Technical
  • +1

    "Clarifying question: Am I the first one to notice the fire, or there are people already on it? Extent and source of fire - I am assuming it's localized and I am inside the data center, safe so far. Response: It is an emergency. I will do and coordinate the people to do the following in parallel, if I am the first one to know. Get immediate attention of folks in the data center. Get someone and many people to call 911 and security. Coordinate to have people in need evacuated. Turn off th"

    Bg - "Clarifying question: Am I the first one to notice the fire, or there are people already on it? Extent and source of fire - I am assuming it's localized and I am inside the data center, safe so far. Response: It is an emergency. I will do and coordinate the people to do the following in parallel, if I am the first one to know. Get immediate attention of folks in the data center. Get someone and many people to call 911 and security. Coordinate to have people in need evacuated. Turn off th"See full answer

    Technical
  • Google logoAsked at Google 

    "Below are few key things enterprises look for in a data center : Location Proximity to target user base Potential risk exposure due to natural calamities (hurricane, storms, tornedos etc) Real estate cost (Service cost will also be proportional to how expensive it is to acquire and run data center) Security Physical security Logical security (Segregation) Industry standard compliance PCI DSS ISO etc Ability to support HA and DR requir"

    Hmm T. - "Below are few key things enterprises look for in a data center : Location Proximity to target user base Potential risk exposure due to natural calamities (hurricane, storms, tornedos etc) Real estate cost (Service cost will also be proportional to how expensive it is to acquire and run data center) Security Physical security Logical security (Segregation) Industry standard compliance PCI DSS ISO etc Ability to support HA and DR requir"See full answer

    Technical
  • Google logoAsked at Google 
    Technical
    Concept
  • Meta (Facebook) logoAsked at Meta (Facebook) 

    "If it's a product end to end, then there's a lot to say. If it's just a feature on top of a product then I will focus on the complexity and how I break complex tasks into small milestones to partner with XFN teams to nail it. Focus on situation, task, actions and results"

    S G. - "If it's a product end to end, then there's a lot to say. If it's just a feature on top of a product then I will focus on the complexity and how I break complex tasks into small milestones to partner with XFN teams to nail it. Focus on situation, task, actions and results"See full answer

    Product Manager
    Behavioral
    +2 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 

    "generally at the beginning of ever project the PgM has to come up with 5Ws & a H that translates in to a project charter. this forms the baseline expectations for a project to get kick-started."

    Chakravarthy B. - "generally at the beginning of ever project the PgM has to come up with 5Ws & a H that translates in to a project charter. this forms the baseline expectations for a project to get kick-started."See full answer

    Analytical
    Execution
  • +1

    "Let's apply Porter's Five Forces model to Amazon's business. All of these are my personal opinions. Industry Rivalry - There's a continuous rivalry in the ecommerce space with each rival trying to focus on specific aspect's of Amazon's business. Walmart (price, convenience), Google Shopping (relevancy, search), Shopify (brand trust, direct buying), eBay (antiques, used, shipping), Facebook Marketplace (buy from 3P sellers). Threat of new entrants - Amazon continuously faces threa"

    Preyas J. - "Let's apply Porter's Five Forces model to Amazon's business. All of these are my personal opinions. Industry Rivalry - There's a continuous rivalry in the ecommerce space with each rival trying to focus on specific aspect's of Amazon's business. Walmart (price, convenience), Google Shopping (relevancy, search), Shopify (brand trust, direct buying), eBay (antiques, used, shipping), Facebook Marketplace (buy from 3P sellers). Threat of new entrants - Amazon continuously faces threa"See full answer

    Product Strategy
  • 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

    Sales Representative
    Behavioral
    +2 more
  • HBO logoAsked at HBO 
    Behavioral
    Technical
  • HBO logoAsked at HBO 

    "I am working as Scrum Master and I am handling daily status meetings, weekly stakeholders meetings and Initiating Sprint planning."

    Srinivas A. - "I am working as Scrum Master and I am handling daily status meetings, weekly stakeholders meetings and Initiating Sprint planning."See full answer

    Behavioral
  • Google logoAsked at Google 

    "One way to develop project metrics is around what problem the project is trying to solve within a particular timeframe, at a cost of x dollars and with y quality Scope: Did the project deliver as per the problem statement - over and beyond Resources metrics: Planned resources were utilized to contribute to the success Budget: Did the cost of the project implementation be under the budget or over? Schedule: In-flight milestones were completed on time or not as per the plan Was the proje"

    Y C. - "One way to develop project metrics is around what problem the project is trying to solve within a particular timeframe, at a cost of x dollars and with y quality Scope: Did the project deliver as per the problem statement - over and beyond Resources metrics: Planned resources were utilized to contribute to the success Budget: Did the cost of the project implementation be under the budget or over? Schedule: In-flight milestones were completed on time or not as per the plan Was the proje"See full answer

    Technical Program Manager
    Technical
    +1 more
  • Google logoAsked at Google 
    +1

    "I will look at the % of overspend. If we are within 10%, I would not worry about it too much as most budgets factor in 10% contingency. If Budget has exceeded 10% Threshold, I will use the following approach: Deep dive on current status: Understand % work completed/accepted Analyse Schedule/Time progress Understand Project Priority: P1/P2/P3 Resourcing: Internal/External Complexity: Technical design (Number of Applications involved/ Number of Interfaces to be build e"

    Saket S. - "I will look at the % of overspend. If we are within 10%, I would not worry about it too much as most budgets factor in 10% contingency. If Budget has exceeded 10% Threshold, I will use the following approach: Deep dive on current status: Understand % work completed/accepted Analyse Schedule/Time progress Understand Project Priority: P1/P2/P3 Resourcing: Internal/External Complexity: Technical design (Number of Applications involved/ Number of Interfaces to be build e"See full answer

    Program Sense
    Analytical
    +1 more
Showing 3141-3160 of 4058