Amazon
Amazon

Software Development Engineer 1

Number of Islands II

Medium
Round 2 (February)CodingCandidate Selected

Determine the number of islands in a grid using the Disjoint Set Union (DSU) method. Initially treat every cell as water and progressively convert cells into land. Increase the island count as land cells are added and use union operations for adjacent land cells. The discussion includes implementation of DSU, union by rank/size, path compression, and various time and space complexities.

This question was asked in

Amazon Software Development Engineer 1 Interview Experience

The Amazon interview process consisted of three rounds, featuring a mix of coding, behavioral, and system design questions. Candidates can expect technical questions related to Binary Search and Dynamic Programming in the first two rounds, followed by discussions on project experience and Leadership Principles in the final round. Overall, the interview experience at Amazon appears to be challenging and comprehensive, testing both technical and behavioral competencies.

AI Powered

Share Your Story

Share your interview in your own words — our AI handles the rest. Hardly takes 2 minutes.

Take Mock Interview

Prepare better with expert feedback

Want to Connect 1:1?

Connect with me 1:1 for career guidance, resume reviews, interviews, and more.

Show Your Love!

Connect with us on social media