whoami: 3 YoE, working at a startup.
I was reached out by Amazon recruiter for the role of SDE-2 checking if I was interested. After confirmation, an online assesment link was shared.
Online assessment round(Hackerearth):
Q1. It was on the lines of that meeting times were given for a day, i.e. 24 hours. Needed to find number of meeting rooms required. Similar to Meeting rooms-ii.
Q2. Given a list of words, reverse the words whose index is a number in Fibonacci series.
Eg. "Hello How are you"
Reverse words at index 1,1,2,3,5,8 ...
I was able to solve both of them. I was then reached out by the recruiter for virtual-onsite interview scheduling. The overall process took around 2-3 weeks.
Round 1
LP question: What is the most innovative work you have done?
Coding: Print boundary of a binary tree. Code should cover all corner cases and a dry run is required.
Round 2
LP question: Tell me about a problem when you had to dig deep into technicalities and figure out a solution.
Coding: Merge K Sorted arrays. It was arrays instead of lists here.
Round 3
This was a design round.
LP question: Tell me about things you did apart from your primary responsibility.
Design question: Design a metric publishing system for cloud environments.
Various applications running in the cloud environment should be able to publish some metrics via this systyem. There should also be mechanism for analyzing the metric data at a later point of time. Which all services are required, databases, how will you fetch the metric data at a later point in time? How will different applciation interact with the metric publishing system? (I suggested an SDK based approach. The SDK would encapsulate the exposed REST APIs and provide an layered way for the application to interact with the metric system).
Round 4
LP questions
Coding question: Given a root directory, find all duplicate files in that.
Now this one I had to clarify definition of duplicates, how is the directory structure represented, should I consider this as a n-ary tree with each node being either file or directory. All these were discussed and I then suggested a BFS based approach for navigating the tree. Now, how do I check if two files are duplicate? I suggested adding hash values(md5 sums) into a Hashmap and then comparing them for each traversed file while adding its own hash values in the Hashmap. Code was required.
Round 5 (Bar raiser)
LP questions
Design question
Design a price automation system.
We need to crawl(or scrape) the competitors website for price comparison of a product and report it for further processing. Eg. Samsung galaxy price on Amazon is 10K, then find price for this product on competitor's website.
Discussions revolved around which all microservices are required, databases, intercation between services for HLD.
For LLD, class designs was written.
Tips:
All the best folks!! :)