Interview was conducted on Amazon chime. There was 1 interviewer.
Interview started with a basic introduction. There were 2 DSA Problems.
Question 1-
It was a Graph Problem of Medium-Hard Difficulty. Took me some time to understand the problem correctly. Finding how to use graph was a bit difficult. Then, deriving the output from the graph was also difficult. Took 15-20 minutes to find the correct approach. After discussing the approach, I coded using DSU. To further optimise it, did path compression and Union by Rank. Interviewer was very friendly, pointed out some silly mistakes. I corrected them quickly. Explained time and space complexity.
Question 2-
It was related to tree. I used recursion to solve. Started with brute force, then gave optimised approach. Explained time complexity.
In the end, I asked some questions about Amazon.
Hope this helps :)