Skip to content

Commit

Permalink
Merge pull request TheAlgorithms#1 from sidaksohi/sidaksohi-patch-1
Browse files Browse the repository at this point in the history
Update number_of_islands.rb
  • Loading branch information
sidaksohi authored Aug 23, 2021
2 parents 5b482ee + 0df030f commit 2d3aaaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion searches/number_of_islands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@



#DFS, Recursive Bottom Up Approach - O(n^2) Time / O(1) Space
#DFS, Recursive Bottom Up Approach - O(n*m) Time / O(1) Space
#Init num_of_islands = 0, return if the grid is empty
#Start a double loop with index to iterate through each plot (each value is a plot of either water or land in this case)
#if the plot is land, dfs(grid, x, y)
Expand Down

0 comments on commit 2d3aaaf

Please sign in to comment.