Round 1: DS Algo
Questions:
-
Minimum Cost for Tickets
This is a hard problem but the interviewer expected a solution within 25 minutes. I took around 35 minutes to complete it. -
Daily Temperatures
Variation of standard stack question, solved it in 10 minutes.
Candidate's Approach
For the first question, I analyzed the problem and tried to implement a dynamic programming solution, which took longer than expected. For the second question, I utilized a stack to efficiently track the temperatures and their indices.
Interviewer's Feedback
Received positive feedback from the interviewer, with suggestions to choose better variable names and improve speed.
Round 2: Low Level Design and DB Schema Design
Questions:
- Asked to design a Chess Game:
- Class Structures and Design Patterns: Discussed OOP principles, inheritance, and design patterns.
- Database Schema Design: Designed tables to manage players, moves, etc.
- API Design: Defined API endpoints for starting a game, making a move, and querying the game state, including detailed payload and response structures.
Candidate's Approach
I focused on creating a modular design for the chess game, ensuring that the class structures adhered to OOP principles. I also carefully considered the database schema to ensure efficient data management and retrieval.
Interviewer's Feedback
The interviewer gave positive feedback.