Round 1: Online Assessment
Questions:
- 2 coding questions that can be solved with greedy algorithms.
- Work simulation that involved system design decisions.
- Work style assessment.
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.
Round 2: Virtual Onsite
Questions:
- Leadership Principles Questions: 2 LP questions before each technical question.
- System Design: Design a platform for Amazon employees to watch training videos, similar to YouTube.
- Coding Questions:
- Word Search:
- Word Search
- Started with BFS, realized DFS was better but continued with BFS.
- Discussed DFS implementation but did not write code.
- Could not determine exact time and space complexity but explained the algorithm.
- Total Compensation Calculation:
- Given a file containing hourly and monthly employee salary (wage, employee_id, manager_id), calculate the total compensation by manager id.
- Discussed data access, using hashmap to aggregate by manager_id, caching results, and memory considerations.
- Follow-up: Suggested using RDBMS with caching layer and batch job for salary data aggregation.
- K-Most Popular Items in a Stream:
- Calculate K-most popular items from a stream of events (event_id, item_id, timestamp).
- Initially thought of using Top K Frequent Elements, but realized heap isn't efficient for continuous data.
- Implemented with hashmap counter and heap, but faced issues with rebuilding the heap.
- Ended up using an array and sorting on each new event.
- Follow-up: Discussed using a queue for a sliding window of events in the last X hours.
- Overall, could not find an optimal solution but explained reasoning and data structure choices.
- Word Search:
Candidate's Approach
- For the Word Search, started with BFS but acknowledged that DFS would be more efficient. Discussed the algorithm's time and space complexity conceptually.
- For the Total Compensation Calculation, explained the use of a hashmap for aggregation and suggested a production implementation using RDBMS and caching.
- For the K-Most Popular Items, initially attempted a heap approach but switched to an array due to efficiency concerns. Discussed a sliding window approach conceptually.
Interviewer's Feedback
- Interviewers were satisfied with the candidate's stories during the LP questions.
- The interviewer was pleased with the candidate's reasoning and approach to problem-solving, even if optimal solutions were not reached.