Phone Screen
Questions: A variant of this problem - Stamping the Grid.
Candidate's Approach
Gave a slightly optimized brute force solution with O(MNXY) and towards the end was able to come up with the concept of prefix sums which would have resulted in O(MN) but didn't have time to implement this.
Interviewer's Feedback
No feedback provided.
Onsite #1 (System Coding)
Questions: Implement a stack using a linked list; make it thread-safe.
Candidate's Approach
I was able to do this fairly easily and explained some concepts behind concurrency primitives. However, I struggled with implementing the CAS approach when asked in the last 10 minutes, as I only had theoretical knowledge.
Interviewer's Feedback
No feedback provided.
Onsite #2 (Algorithms)
Questions: This was a trie question. Each query is of the form "letters""number". You are given a list of words. The answer to each query is true or false, which has a prefix from the query and has exactly the suffix number of characters following it.
- List of words = ['ball', 'apple']
- Query = ['ba2', 'app3']
- The result would be [True, False].
Candidate's Approach
Initially thought of a solution similar to Design Add and Search Words Data Structure, but realized the time complexity would not be linear for the suffix case. Eventually came up with an optimal solution by tracking the remaining number of letters in each Trie Node, which worked and passed all test cases.
Interviewer's Feedback
No feedback provided.
Onsite #3 (System Coding)
Questions: You are provided 4 functions that operate on blocks of data. You need to write their byte-based equivalents and not expose the APIs. The given APIs are block_size(), block_read(), block_write(), and block_seek(). You need to write:
- seek(location) which seeks to a specific byte location,
- read(len) which reads len bytes,
- write(buf) which writes len bytes.
Candidate's Approach
This was an interesting problem. I had to discuss with the interviewer to understand all the intricacies involved and was able to complete the code. The interviewer seemed convinced, and executing this code was not necessary.
Interviewer's Feedback
No feedback provided.
Onsite #4 (Behavioral)
Questions: Standard behavioral interview with the hiring manager. Prep from Amazon's Leadership Principles should help here.
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.
Result: [Reject] After a week of no response, I followed up with the recruiter, who informed me that they decided to proceed with another candidate. The reason given was that I fell short in the technical rounds, and no further specifics could be provided.