A simple contest, inspired by this stackoverflow questionthis stackoverflow question:
You are given an image of a surface photographed by a satellite.The image is a bitmap where water is marked by '
.' and land is marked by '*'. Groups of adjacent '*'s form an island. (Two '*' are adjacent if they are horizontal, vertical or diagonal neighbours). Your task is to print the number of islands in the bitmap.
A single * also counts as an island.
Sample Input:
.........**
**......***
...........
...*.......
*........*.
*.........*
Sample Output:
5
Winner is entry with smallest number of bytes in the code.