There will be several continents on a world map. Idea is to identify the number of continents and the mass in each.
The land is denoted by ‘#’ and ocean by spaces. You have to find the number of continents (connected masses of land) and print the number of # in the continent.
Connected mass of land means that # can be connected in any way i.e. horizontally, vertically or diagonally.
Number of # per continent in descending order of size and total number of continents in the format depicted below
Island 1: <Biggest mass> say 100
Island 2: <Smallest mass> say 50
Number of continents: 2