Skip to content

souldzin/wateralg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Water Algorithm

This is an implementation of the water fill problem.

Example:

Given a grid, with columns along X, how many cells of "water" can be filled, considering runoff:

Example Grid

          _
         | |
 _       | |         _
  |      | |        | |
  | _  _ | | _    _ | |   _
  |  |  |  |  |  | |  |  | |
 _| _| _| _| _| _|_| _| _|_| _

Result: 14

Note: the bottom is solid, but the left edge and right edge are open (there are no walls).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published