AMAZON austin sde2 Fail

Got 2 problems on BFS/DFS approach something similar to island count

Phone Interview
Find top n recently viewed items/products.Asked to write code but the tool didnt have a way to run
the code.Designed using LRU cache

Onsite Interview
Behavioral - 45 minutes

  1. Tell me a time where your ideas was not supported
  2. Tell me a time where you had to convey to leadership that you are not going to meet the initial estimated deadline
  3. Conflict with a team member
  4. There were few i dont remember

Technical : 15 mins (Design a system for Online Book Store)

Behavioral - 30 mins

  1. Time when you need to fix something quickly
  2. Time when you had to change/pivot a strategy after finishing 75% of the project

Technical : Design/Write code for getting nearest Barbeque Restaurents
(Provided solution similar to K closest points to origin using Max Heap)

Behavioral - 20 mins

  1. Some technical issue that you fixed in the recent times
  2. Again time when you had proposed an idea that is not supported

Technical: 40 mins
Given messages from different messengers in some format (user_id, message, time_stamp) find the user who had sent more messages. Problem is very simple based on frequency count…but after writing the code that does that, follow up was to design in such a way it works for different providers like slack, hipchat etc (each has their own format) . This round was little confusing since the interviewer started with an ask for algorithm, then hinted towards database design and then towards object oriented design ( where in requirements was like it can be user who sent more messages, or the user who sent least message or soome filters with some date ranges). It would have been easy if was clear that it was object oriented design initially

Round 4
Behavioral - 20 mins

  1. Time when you resolved a customer issue without being asked
  2. Time when you simplified something for a customer

Technical - 40 mins

  1. Given a node that reperesents you, find a mom node in your maternal ancestory line who has more children.
    Basically its a n-ary tree, each node can represent a “mom” node or “dad” node, given a child node find a mom node which has more children

My solution

class Node:
   def __init__(self, mom, children) = mom
	   self.children = children

Ask was not to populate a tree, but come up with Node strucuture and how to do the traversal to find a mom node with more children.So i wrote code using bottom up traversing from child to parent using mom, tracking down max_children and mom_with_max_children

  1. Follow up was to get K mom with max children. Solved using min_heap by storing K moms in the heap and return it

Round2 and Round4 went really well, Round1 hope i had more time on system design but interviewers
didnt see the time and spent more time on LP. Round 3 was not great so probably based on this they decided not to offer.I felt really close though