Round 1
Questions:
A word was told by the teacher and some n number of students have guessed the sequence. You have to predict whether the given sequence can lead to any valid output.
It was basically to find if a cycle exists in a graph or not, after creating an adjacency list.
Candidate's Approach
I used the topological sort method to determine if a cycle exists in the graph, and the interviewer was satisfied with my approach.
Interviewer's Feedback
No feedback provided.
Round 2
Questions:
Given a matrix that has 0/1, if there is one solid square of 1s, you have to tell the topmost left corner of the solid square and its length.
I proposed a brute force solution.
Follow-up Question: If given that the size of the square table will always be <= sqrt(n) * sqrt(n), n >= m.
Candidate's Approach
No approach provided.
Interviewer's Feedback
The interviewer was satisfied with my initial brute force proposal.
Round 3
Questions:
The first question was about the coin change problem. I explained the recursive solution, memoized solution, and tabulated solution.
Follow-up Question: You have been given the DP array of the above problem; you have to find out what the original coins array was.
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.