Round 1
Questions:
- Discussed experience and deployment strategies.
- Question: Explain how merge sort works and its time complexity.
- Question: If I had an 8 core CPU, how would we modify the merge sort for a huge array and what would be the time complexity then?
- Given multiple situations for normal vs modified merge sort algorithm, order the situations by how much time it would take to sort the array in 1 core vs 8 core CPU.
- Question: Implement a rate limiter using the leaking bucket algorithm. Optimize it for scaling.
- Question: Solve the problem Course Schedule using topological sort.
- Additional questions:
- Mutex vs Channels (Golang)
- RWMutex vs Mutex
- SQL vs NoSQL
- Why is it difficult to scale in SQL?
- Why do people use SQL vs NoSQL? Discussed CAP theorem and examples of consistency vs availability.
Candidate's Approach
- Explained merge sort and its time complexity as O(n log n).
- Discussed modifications for 8 core CPU, focusing on parallel processing.
- Implemented a rate limiter using the leaking bucket algorithm but struggled to optimize it for scaling.
- Coded the solution for the Course Schedule problem using topological sort.
Interviewer's Feedback
No feedback provided.