Round 1
Questions:
- Warm-up question: A standard BFS question.
- Main question: Maximize the path between two points such that each point on the path has the maximum distance from a given point, C.
- I struggled to come up with a proper approach for this question. I suggested a backtracking approach, but the interviewer rejected it.
- In the last 5 minutes, the interviewer asked me to implement the warm-up question instead. I successfully implemented it and provided the time complexity analysis.
Candidate's Approach
I proposed the BFS approach for the warm-up question within 1 minute. However, I struggled with the main question and suggested a backtracking approach, which was not accepted by the interviewer. I ended up implementing the warm-up question successfully.
Interviewer's Feedback
No feedback provided.
Round 2 (Same day)
Questions:
- Question: Given a matrix of 0s and 1s of size (n x m), return the size of the square and the top-most cell of all 1s. It is guaranteed that if the square exists, it will have a side length of √n.
- I proposed an optimized approach but couldn’t fully code it (I left about 3–4 lines incomplete). The interviewer stopped me at exactly 45 minutes.
- When I asked for feedback, the interviewer mentioned that my code was of good quality, but I needed to improve my problem-solving skills.
Candidate's Approach
I proposed an optimized approach for the matrix problem but was unable to complete the coding within the time limit. I left a few lines incomplete when the interviewer stopped me.
Interviewer's Feedback
The interviewer mentioned that my code was of good quality, but I needed to improve my problem-solving skills.