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.

Mock Interviews & 1:1 Guidance

Practice mock interviews or book a 1:1 call for career guidance, resume reviews, and more.

AI Interview Prep

AI interview prep powered by real interview data.

Show Your Love!

Connect with us on social media

Number of Islands II | Amazon Interview Question | InterviewRecap