Sign In

Count The Islands Using Dfs

DSA Course Project - Count the Islands using DFS

Assignment 4 - Final Course Project for Data Structures and Algorithms in Python course

This notebook solves the following problem using Depth First Search:

Given a boolean 2D matrix, find the number of islands. A group of connected 1s forms an island.


project_name = 'Count the Islands using DFS' # give it an appropriate name
!pip install jovian --upgrade --quiet
import jovian
from timeit import default_timer as timer
from textwrap import dedent
import math
[jovian] Detected Colab notebook... [jovian] Uploading colab notebook to Jovian... [jovian] Capturing environment.. [jovian] Committed successfully!
Gerhard T6 months ago