# Interview Questions

interview questions shared by candidates

## Interview Questions

### Executive Assistant at Amazon was asked...

Tell me about a time where something you planned did not turn out as you expected. 1 AnswerThis provides you with an opportunity to discuss how you handle the unexpected and solved for it. |

### Merchandising Manager at Amazon was asked...

What is the difference between wholesale and retail pricing? 1 AnswerWholesale is the price you sell to the retailer or distributor. Retail is the price that the item sells for to the consumer. |

From the math test staffing situation: If one person leaves this position early because he gets sick, how would you reassign the remaining employees in order to ship out the correct number of product for the day? 1 AnswerThis was the question I stalled the interviewers on initially because I had manipulated the initial numbers in the math question to give me a buffer of employees in two areas so this wouldn't be an issue. Apparently no one else thought about people calling in sick or not showing up to work, so I think I impressed at least one interviewer by thinking ahead in this situation. |

The three data structure questions are: 1. the difference between linked list and array; 2. the difference between stack and queue; 3. describe hash table. |

Tell me about a time you used analysis to make a business-critical decision. Walk me through the analysis and outcome. 1 AnswerI analyzed the output of all the machines on our factory sales floor and determined what the bottleneck machines were. I put in a request to purchase more of the bottleneck machines. The new machines alleviated the bottleneck in production, drastically speeding up the total output of the factory in the process. |

### Inventory Control Specialist at Walmart was asked...

On what occasion did I ever have to resolve a concern for a customer, and what did I do to resolve said issue. |

What actions would you take if you found that you are actually carrying too much inventory? |

### Manager at Amazon was asked...

If you had 5,623 participants in a tournament, how many games would need to be played to determine the winner 60 AnswersBefore I could figure that out, I'd need to know whether the # of participants represents the number of individuals on larger teams, or the number of teams A specific numerical answer can be given, but there are multiple ways the tournament can be setup, for example, are there play-in games, byes, etc. I would think the question is being given to a manager to see how they think and process, and then come up with a specific numerical answer, as opposed to just a math problem. It can be just one game. A huge mock battle. Show More Responses 5,622. Assuming it is a single elimination tournament. All teams lose one game except the champs. It's always # of teams - 1 if each team plays until it loses in one(team)-on-one(team) contests, the answer is ln(5623)/ln(2) Assuming it is a simple process of elimination, it takes 5622 losers to get 1 winner from 5623 participants. So, it would require 5622 games. if it's a 1:1 type draw, then # rounds = (5623)**x where x is base 2. a good answer is between 12 and 13 rounds. 2**12 = 4096 so I'd draw up 13 rounds and give out 1,527 byes. There is no true answer as the question is very open ended. The interviewer is probably looking at task delegation, management and creativity skills. One One. Obviously. One game, all players participate. If participants equal number of teams involved, think power of 2. Show More Responses The interviewer is not looking for the right answer because there can be many. What he/she is looking for is your logical approach in solving the answer. So you could start by probing more is first I would like to understand if 5,623 participants represent the number of team or individuals. Then ask the next logical question based on the answer. Everyone who didn't ask a follow up question except Mike is right. The question says, "if YOU had ...". This requires no follow up questions, because YOU should decide how YOU are going to operate YOUR tournament. Why would Mike or any of the others think it's someone else's job to organize his/her tournament. Oh just a follow up. My tournament would be held in the top of a hardly dormant volcano. Everyone would get a backpack full of grenades and the first one out of the crater without dying wins. That makes 1 game. Also, I think most participants who got out of the volcano alive would consider themselves winners, but only one would get to keep the gold plated dancing chiquita banana. Yipee!!!! I'm right too! Take that Mike! it'd be one game if it was a battle to the DEATH I agree with Nancy there is no strict answer to this question it is all about problem solving. First thing to do is to get more information, if it is not forthcoming then make assumptions, as an interviewer I would not be impressed if the candidate didn't ask for more information, although I probably would not supply any more. Then looking for a logical (and humane) answer which is substantiated with appropriate reasoning. Ie number of people on a team, game being played, what is required to win a match, are there several games in a match? knockout style tornamant sounds like a good approach. I agree with Mike. Just show the interviewer how you think and how you will tackle the problem in a colloborative environment 1 I agree with the very first response. Many of you are perhaps making the assumption that this is a one-on-one tournament such as singles tennis. Isn't it possible the question could refer to a soccer or basketball tournament where there are multiple players on each team? That would certainly bring the number of games to be played down considerably. I'd give an approximate answer, stating my assumptions. The question asked is not the number of rounds (2 people per game: log base 2, giving approximately 13 rounds with everyone playing at least one game ) - it's the number of games. So, if two people per game, then it's the sum of 5623/2 + 5623/4 + 5623/8 + 5623/16 + ... The limit of this is not something I know off the top of my head, but it's less than 5623. Also, interestingly, you need to account for the original number being odd. That could be accommodated in a number of ways, none of them straightforward. 5622 ... if based on elimination between 2. Show More Responses I personally agree with most of you. If you read the posts here, you see all types of answers. Some say "1". Short and simple rules to a simple game. Others have posted all types of formulas and methods to figure out a process. The answers here are all a good example of different minds using different means to find an end. Those different answers are what a good interviewer would be looking for. If the job needs a person that is logical and takes time to plan things out, or perhaps someone that needs to think fast on their feet. That kind of question could come in handy for any kind of interview in my opinion. 1 I think the interviewer is asking you to ask for more information, ask three qualifieng questions to be exact in order to show you have the probing skills to fully understand a customers situation or company problem and have the ability to ask the appropriate questions to or to get the help to solve. Question 1) How many players are allowed per round? Question 2) Is there a time restriction on these rounds? (Daylight or Night as well) Question 3) Are there going to be different classes for the golfers? Are we taking handicaps into consideration? I guess there could be more questions but chances are the interviewer would stop you after the third question. The correct answer is: "I didn't come here to play bulls**t games for 8 hours, you Mac-slinging hipster. Ask me a real question." 5622....................................assuming single elimination 5623 is a prime number. Good luck dividing into even teams. Also, there is no use of the word "minimum" in the original question. This question is a good example of a problem with no absolute answer. If I were to ask this of an interview candidate (which I wouldn't because I think subjective questions are mostly a waste of time for everyone involved), I would look for someone who can: A) Ask questions to pin down a few details. B) Formulate options. C) Suggest options with recommendation and take feedback. D) Execute (pretty hard to demonstrate in the 10 minutes max I'd give this). p.s. I'd hire chapped. Good answer! Depends on the numbers of players per team. 'Excuse me, I'm just waiting for excel to open and my math wiz buddy in accounts to pick up to verify my calculation. I'll get back to you in two minutes with the answer.' I would try and be creative and put my suggestions in front of them while I give them a reason for all the options that I choose. For instance, I'd say I would create 5 levels for each game as adding more levels makes the game more challenging and interesting. I wouldn't want to set up too many games as it would require a lot of overhead using up a lot of resources for organizing large number of games. Hence, in each round I would eliminate 20 participants. That would make 100 players getting eliminated after every game. After every 10 games, I would allow all the eliminated contestants to battle it out and 15 can re-enter the game as the eliminated ones would get a chance to observe, learn, refresh and get a second chance... (The interviewer might stop me eventually before it gets too long). Even though my answer was too long, I think I would show them how my logical thinking works. They would see that I am thinking aloud and in the end all that matters is how we approach the problem rather than giving them a vague answer with no reasoning. Show More Responses Oh and I agree with Toasty, I would hire chapped :) I like the way they think. Oh and I agree with Toasty, I would hire chapped :) I like the way they think. i dont know how everybody else thinks butI divided by two with an extra game for when the number is odd and came up with 5627. the question was straight forward, " How many games".... I would have been startled as well, just reading it. Congrats on keeping your calm! My intuitive answer would have probably been: Game theory - 1 or rather none - when it's a battle to death everyone loses, even the winner (last man standing, howling at the moon). I would have likened it to the company and customer situation - in good company EVERYONE is a winner (win-win scenario). Good luck with your endeavors! 1. I think, this question is for a management position. The size of team is given as a too big random number. One cannot control a team of 5627. Divide them in a measure size, e.g size of 10 or 20 (any measureble size). With 10, there will ve 563, which can be further divided into 10, leading to apx 57. that can be futher divided into 10, leaving it to 6 teams. proformance/ goals can be set and can be evaluated later. 2. or do a marathon. None. Our PC world demands everyone gets a trophy. ********************* Keep in mind the position, Nathaniel is right. YOU are organizing the tournament, make a rational decision and describe it. Your answer should be formulated to convey a skill. For example I might suggest something like this: 1 on 1 round robin, 5,623 players, SUM(1+2+3+...+5621+5622) games Quick and simple, shows some knowledge of algorithms but not very practical. The 1st participant plays 5622 others, the 2nd plays 5621, until the 5622nd plays 1 (5623rd participant). Notice you don't add 5623. Participant with the most wins is the champion. Supposed it is a single elimination. should be 5626 games because the first row would be 5623/2 = 2811.5 which means 1 person must be going to the next round to compete therefore we will have 2812 contestants then the second row would be 2812/2 = 1406 the third row would be 1406/2 = 703(odd number which means the one of them is going to the next round without a fight. ect... I believe I would have responded with "Is that how many applicants there are for this job?" Followed by "One game, one victor." Before answering you should read the interview report this question is linked from, where the question is explained in more detail -- """If you had 5,623 participants in a tournament, and each participant had to play games until he/she one or lost, and every game had a winner and loser, how many games would have to be played in order to determine the winner of the tournament""" So it's pretty unambiguous: Participants are individuals; the tournament is single elimination; games involve just two parties (a winner and a loser.) The question doesn't ask about the number of rounds involved, nor about timeframe. Just the sheer number of games. So we're left with an answer of 5622 games (because every game has one and only one loser and 5623 - 1 participants need to lose for there to be a single participant left as the winner, so that's how many games there must be.) Show More Responses Assuming in each game "n" people participate and there is just one winner in a game. If N is the total number of people (in this case 5623), then the approximate number of games would be: log(N)/log(g) -1 After each round, you would have half the number that started the previous round; except if it were an odd number it would he half + 1. So 13 rounds. 2812 1 1406 2 703 3 352 4 176 5 88 6 44 7 22 8 11 9 6 10 3 11 2 12 1 13 It is far simpler than you guys are making it out to be. In ALL single elimination tournaments there is one less game than the number of participants. Because in every game 1 team gets eliminated. And at the end 1 team has to be left standing. This will be a detailed explanation. Since they're asking for a tournament, that means one on one matches, and eliminations of 'participants' or players. With such a large number doing a round robin style tournament would not be very efficient, as every player would have to play every other player, ((N-1)^2)/2 =15,803,442 matches. I would first start to get more details of the tournament. If it were up to me to design the tournament and easily determine the number of matches, I would go with single elimination bracket because since its based on power of 2. Contrary to what what Bob InNorCal did, you dont start halving the at the beginning with 5623, because its not power of 2. You will get to a point where there wont be even numbers, and BYEs will have to be given, it would be unfair to give byes out at the end or middle of the tournament, players would complain that others got BYEs and they didnt. Detailed Explaination: In a single elimination bracket, the brackets end with 1 match between 2 players, then 2 matches and 4 player, and eventually for this tournament, 4096 matches between 8192 players. But since we dont have 8192 players, there will have to be BYEs which wont count as matches. In this case we'll have to use a 8192 single bracket, with the first 4096 players spread every other position then the last 1527 players spread evenly throughout the bracket and the remaining 2569 positions are BYEs (4096 + 1527 + 2569 = 8192). Here are how the rounds look like: A - 1527 matches, (4096 matches was suppose to happen, but 2569 BYEs are no counted) B - 2048 matches, C - 1024 matches, D - 512 matches, E - 256 matches, F - 128 matches, G - 64 matches, H - 32 matches, I - 16 matches, J - 8 matches, K - 4 matches L - 2 matches, M - 1 match From round B-M, its (2^12)-1 = 4095, so with Round A, its 4095+1527=5622. The calculated answer 5622 is one match less than the number of participants. However, just because its easy with single elimination to determine the number of matches, does not mean that it is what they initially asked, conversing with the interviewer for more details of the tournament is important. If the interviewer said it was a double elimination tournament then a player would have to lose twice in the bracket to be eliminated from the tournament. Depending on the number of players and the placement of the BYEs, then calculating the number of matches in a true double elimination maybe difficult. Also in Double Elimination, the winner maybe won by someone without a loss or with 1 loss, the winner without a loss means one less game. it is assumed that the competition is a head to head knockout competition like wimbledon. the only correct answer is 5,622. the quickest and smartest way to get that answer is to see that in a knockout tournament every body loses once and only once, except the winner. in every match, one person loses. therefore the number of matches required equals the number of players minus 1. PaulO, Jordan, madhur, simplebrain and key2success you are all hired! How many games are played? Well all of them of course, how else do you find the winner. It need only one game to find the winner If it is your game you can appoint a winner without playing any games. Then 0 is a possible answer. 1 is also a viable answer, if it is a game of life and death it is possible that no one lives then there are no winners on the first round. Such as a game that on the first round were everybody is exposed to a nuclear blast. Even those exposed to the fall out might be considered losers. A game like chess where you eliminate draw contestant then 1 round to 13 rounds would be required. You could divide by 2 to get the rounds or use logarithms to convert 2**13 which is greater than 5,623 to a log equation such as log(5,623)/log(2). Potentially everybody can loose on the first round because of the draw rule and the person with the bye on the first round can loose because they have no one to play to win. You can change the rules so that infinite rounds are required to determine a winner. One way to do this is to increase the elimination rounds so that it approaches infinity. As this goes on your interviewers glaze over and fall to sleep and when they wake up they decide not to give you the job. This can be poker tournament (as too many players). From 5-7 people - one wins. This can keep number of games to reasonable limit. Depends on how many rounds there are to determine a winner. Logical answer here could be 5623 Show More Responses 5,623 - each person plays, person with the highest score wins. There would be 5613 head-to-head games cosisting of 12 rounds with one team receiving a bye in each round except the fourth round, the tenth round, and, of course, the twelfth round. Assuming the tournament is Mortal Kombat everyone knows that earth realm has to win because out realm is evil and evil... Sucks. No games necessary. What kind of tournament? There will be 2 games. The first game is a question: Would you like to play a game? Which is then followed by the second game - one involving thrones. One 2 |

### Product Development at Amazon was asked...

"Jeff Bezos walks into your office and says you can have a million dollars to launch your best entrepreneurial idea. What is it?" 22 AnswersThis will lead into a series of questions that probably are tailored to the job role under discussion: Who are the customers for this? How do you know there's a market for it? How would you implement this? Why is it better than X, Y or Z? What about the risk of _____? etc, etc, etc The answer is probably very generic. I don't know anything about Amazon's culture but giving your ideas, especially entrepreneurial, for no benefit to you is just not smart. Being considered for a job is equal to no benefit as Amazon has made no commitment to hire you. Knowing the Amazon culture, the interviewer was trying to figure out if you can think big. Then, follow up questions will go into whether you can dig deep. They would question your core beliefs on things you are passionate about to determine if you can defend your position. If there are any aspects of your position that are not rock solid, they would try to provide alternate approaches to see if you are capable of disagreeing and committing to an idea other than your own. But for the most part, this is a think big check. Show More Responses I would probably say a scam were you dress up as Jeff Bezos and walk into interviews a steal the interviewers best ideas and sell them as your own. It would only cost $2000 in theater dressings. That leaves $998,000 for a actual product when an idea hits me and there is a business case. I will share as long as all parties are willing to sign a NDA. I cannot tell you right now, I am in an interview, once I get hired we talk about it. If I would have a good entrepreneral idea, I wouldn't be sitting here, answering these stupid questions and waisting my time". Sure, you wouldn't be hired, but do you want to work for the company that hiring people based on these kind of questions? I would use it to purchase plots of land in urban areas to build stackable, self-contained pod homes for the homeless and parolees, much like I saw used for migrant construction workers in Europe. You're going to offer me $1 million before you even know what my idea is? If i told you that, i would have to kill you. (i can't say id get hired, but if i had an idea that i honestly thought i could make into something massively profitable, i wouldn't go telling anyone about it) It is not probably what they want to hear but the thing any sane entrepreneur when offered an investment would ask is "on what conditions?". Being offered $1M means nothing if, for example, in return Bezos wants 99% of your company. :) All the good things start with faith and trust. What office? Show More Responses I would use it to create a hostile takeover of the company that makes Chapstick. The fortune I would make is from the legion of minions that follow Mr. Jeff Bezos, and the protection they would need from kissing his behind. I would tell him my time is valuable, stop asking me what I would do with chump change. Come back with real money, when you are serious about developing my ideas. i refuse to take the money saying that i don't believe in partnership. I would shake his hand, Look him in the eye, smile, and then tell him to trash the Kindle. Then I would tell him to keep the million dollars and put it into a device that would replace the tablet entirely. Next, I would tell him that I want dividend from each device produced, not sold. Million? No I would rather wait and take a billion. It's a million dollars. Didn't you just say so? Totally ridiculous question. And there are many more that Amazon asks which are equally nonsense and have no bearing to the job or to evaluate the person's skill levels. I actually had interviewers asking me questions around the job THEY were doing-like -my vendor is not interested in review systems, how should I offer him an incentive. Duh, if you cannot answer that lady, you don't deserve your own job! Any corporate manager knows that the best thing to do is to ask someone below you for a great idea. Then fire him and take the credit, Of course if the idea turns out badly then you can always point out that it was the other guy's idea and that is why you fired him. That's a trick question. He'd never do that. Time Travel |

Write an algorithm to determine if 2 linked lists intersect 15 AnswersThe first answer is simply looping through every item in list one checking it against all items in list 2 until you find a match. This is O(n2) and you'll be asked to improve it. Think about other data structures with faster access to improve this algorithm. ^ Use a HashMap? We could traverse and put every node we see in a hashmap @PixelPerfect3 Yes, a hashtable would do the job. Just put every node from one of the lists into a hashtable then traverse the other list checking to see if each node exists in the hashmap. This would then be in O(n) time with the downside of using more memory for the hashtable. Show More Responses I don't understand why we would need extra space for this problem. If two linked list intersects, that means their end are the same. Traverse until the end of both list and check if the address of the last nodes are the same. @Anonymous - you are right. All we need to do is check if the ends are the same. My solution would be useful if we want to find the node they intersect at. @PixelPerfect3 & @Anon - Sorry guys, that's not correct. It's not that the end of the lists are the same - intersecting means if any nodes within the linked list are the same. For example: List 1 = 1 -> 3 -> 5 -> 6 -> 7 -> 9 List 2 = 2 -> 4 -> 6 -> 8 -> 10 In this case, the 4th element of list 1 and the 3rd element of list 2 are "intesecting". Notice how the ends are different yet still they intersect. The extra space used by the hashtable is made up for by the speed of lookup O(1) in the hashtable. If space is an issue and speed not, you'd go for the O(n2) solution which is to traverse through List 1 and for every node check it against all the nodes in List 2. @Ja, would it be more clear to describe this question as "Check two LinkedLists, to see if they have one node sharing the same value." ? @Ron Perhaps, yes. But take a look online for other people who have been asked this question from Amazon/Microsoft/Google. They tend to ask for "intersecting" linked lists, which means the lists share one or more of the same node. In my simple case above it might look as if it's just the value of each node in the list but I think technically intersecting means they share the same node, i.e. the object. My example was just for illustration but if you were writing this for real you'd want to check the node->next pointer to see if it's the same object in both lists. @Ja, Your example doesn't really make sense: how can the node with value 6 point to a node with value 7 AND a node with value 8? It can only point to one node: either 7 or 8. That's why I think Anonymous' answer is correct. @PixelPerfect3 - It's not the nodes value that's important but the actual node itself, i.e. the value of the next pointer will be the same for a node in both lists. Simply saying "the last node in the list will be the same" is incorrect! Linked lists can intersect at any point in the lists and not share the same last node. Actually, you know I think you guys are right after some thought! My only concern was to find the actual node they intersect at but PixelPerfect3 had a point - being that a singly linked list only points to one next node, if at any point they intersect then they must have the same node at the end of the list. Sorry for adding to the confusion. If you wish to know exactly where they intersect then my solution posted above will work but if you just need to know if they intersect, PixelPerfect3 and Anon solution of the same end element is correct. 1) len1=find length of linkedlist1 2) len2 =find length of linkedlist2. 3) move the bigger linked list to (len1-len2) position. 4) rightnow both linked lists are equal at distance from last node. that is they are n node away last node. 5) iterate both LL simulatenously and if they have same instance that is their intersection point. I think all of you guys missed one important problem. What if the linked lists have cycles? I believe this is one of the important points the interviewer want you to think about. Show More Responses Assumption that if one node intersects, all nodes from there till the end intersect is wrong. For example, my node definition is: typedef struct NODE { int value; NODE *ptr1; NODE *ptr2; } LISTNODE; If I use ptr1 only for first list and ptr2 only for second list; then I could have an intersection at the middle element but not in the end. Its a different question why one would want to design a node the way I mentioned above; but the assumption is wrong. Common answers: a) If lists aren't cyclic; use a visited flag in the NODE definition and traverse first list and mark all nodes visited. Then traverse second and read the flag. b) Use a hash-map with address as the key. Insert into hash-map while traversing first list. Check the hashmap while traversing second. c) If the list could have cycles, still b) and a) would work with any modifications. Thats a double linked list. Not a linked list. |