Skip to content

Instantly share code, notes, and snippets.

View belide's full-sized avatar
💭
Always WEB!

belide

💭
Always WEB!
View GitHub Profile
@vinnymac
vinnymac / README.md
Last active July 28, 2022 23:31
Amazon Interview Islands Question (Daily Coding Problem)

Good morning! Here's your coding interview problem for today.

This problem was asked by Amazon.

Given a matrix of 1s and 0s, return the number of "islands" in the matrix. A 1 represents land and 0 represents water, so an island is a group of 1s that are neighboring whose perimeter is surrounded by water.

For example, this matrix has 4 islands.

1 0 0 0 0