Round 1 (Hiring Manager)
Questions:
- Leadership Principles Questions: Basic standard 2 LP questions.
- HLD: Design Kindle. The focus was on how to sync page offsets among multiple Kindle devices, ensuring a user starts reading from page 100 of a book on one device if they were on page 100 of the same book on another device.
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.
Round 2
Questions:
- Leadership Principles Questions: Basic standard 2 LP questions.
- Coding Question: Implement a String formatter: Given a string and a list of replacements as input, return the formatted string by replacing the valid indices with the appropriate replacement string from the given list.
- Input:
"Sample{{ {1}, {0}{1}"
, replacements:["alice", "Bob"]
=> Output:"Sample{{ Bob, aliceBob"
- Input:
"Sample {1}"
, replacements:["alice"]
=> Throw an exception. - Throw an exception in any invalid case.
- Input:
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.
Round 3 (Bar Raiser)
Questions:
- Leadership Principles Questions: Basic standard 2 LP questions.
- Ambiguous Problem: Ultimately boiled down to the Number of Islands (0-1 matrix) problem.
- Original problem: Return number of clusters (components).
- Follow-up problem: Return a list of the size of each cluster.
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.
Round 4
Questions:
- Leadership Principles Questions: Basic standard 2 LP questions.
- Coding Question: Same as this. The interviewer's expectation was to come up with an O(N) approach. The candidate used the idea behind polynomial rolling hash to store the sequence of visited pages to reduce the complexity and suggested reducing the collision probability by using multiple hash combinations.
Candidate's Approach
The candidate used polynomial rolling hash to store the sequence of visited pages, aiming for an O(N) complexity. They suggested using multiple hash combinations to reduce collision probability.
Interviewer's Feedback
The interviewer seemed impressed with the candidate's approach.