Amazon | Seattle Virtual Onsite | SRE2 All 4 rounds

Round 1 - Bar raiser
Create a doggie daycare app:

  1. to enter dogs need to be vaccinated
  2. dogs less than 4 months and more than 10 yo go to a kessel, capacity 20
  3. small dogs enter into small gods playgrounds, capacity 30
  4. big dogs enter into small gods playgrounds, capacity 20
  5. dogs come and go all the time
    '''
    class DoggieDayCare(): 
    self.kessel = 0 
    self.small = 0 
    self.big = 0 
    def welcome_doggie(dogId):   
    pass 
    def bye_bye_doggie(dogId):   
    pass
    '''

Round 2 - Hiring Manager

Create a set that holds elements with an expiration date. Expired elements need to be deleted. Use dict vs queue

Round 3 - Design Patterns
Subscribe / Publish
'''
class EventManager(): 
self.event_dict = {}
def subscribe(eventName, callback):   
pass 
def publish(eventName, param)

e = EventManager()
e.subscribe(''category'', lambda x: print(x))
e.publish('category', 'event1') # should print 'event 1'
e.publish('category', 'event2') # should print 'event 2'
'''

Round 4 - Algos and Data Structures
Return all words starting with a prefix
Ex:
Words: [Apple Application Banana Boore Book]
Prefix: 'App', 'Boo'
Return: [Apple, Application], [Boore, Book]

*Interview taken in September 2020 for the Seattle EC2 team

Comments (1)