Show differencesHistory of post edits
#Actualfastcall22
Posted 30 May 2012 - 03:32 PM
Starting from known "rooted" cells (all cells in the first row), mark the cell and its neighbors as being "rooted". Repeat the process for each neighbor until all neighbors have been visited. Any cells left unmarked are floating. Traverse a cell in each floating island (by marking each cell) and its neighbors to determine which group of cells a floating cell belongs to.
#1fastcall22
Posted 30 May 2012 - 03:29 PM
Starting from known "rooted" cells (all cells in the first row), mark the cell and its neighbors as as being "rooted". Repeat the process for each neighbor until all neighbors have been visited. Any cells left unmarked are floating.