Skip to content

m4kyu/golands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golands

golands is an implementation of number of islands problem, made as project for learning Go.

Algorithm

Map of islands is represented as a 2D array, where 0 - Water. 1 - Land.\

golands starts iterating through the cells of the map, everytime it encounters a land(1) islands counter increases and we fill all the neiber cells with water using DFS algorithm

Usage

First install golands

git clone https://github.com/m4kyu/golands.git
go build

Then you can provide a valid map file and it will count the islands

./golands map.txt

About

golands - solution for number of islands problem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages