1st round:
LP: Tell me about a time when you were challenged to think differently.
I was also asked to name all the design patterns I knew and to describe one of them.
Coding: Write code for a card game as follows--given a set of 30 cards, each player gets 3 cards. Given a list of lists, representing each players combination of cards, return the winner(s). The criteria for winning (in order of ranking) is:
So if there was one set of cards that met the first criteria, it would win. We would move onto subsequent criteria to break ties, or if earlier criteria had not been met.
Write extendable and testable object-oriented code for this game.
A potential solution we discussed was to have a Card class, Game class, abstract Combination class, and multiple different Combination subclasses that would implement the criteria for the above combos. Each game class would have Combination objects that it would run through to check each hand of cards.
2nd round:
LPs: Tell me about yourself. Why Amazon? Tell me about a time when you faced a time crunch.
Coding: Best time to buy and sell stock i and ii
3rd:
LPs: Tell me about a time when you helped a peer. Tell me about a time when you faced a time crunch.
Coding: Amazon has transport trucks that need to drop off and pick up trailers from facility parking lots. Describe a data structure and algorithm to minimize the time between drop off and pick up (i.e. travel time from one parking spot to the next free parking spot). A parking lot row was represented like this in the example:
[1 - free][2 - free][3-pick up][4-occupied][5-free]