Islands in a graph using BFS
Given a binary 2D matrix, find the number of islands. A group of connected 1s forms an island. Examples: Input: M[][] = {{â1â, â1â, â0â, â0â, â0â}, {â0â, â1â, â0â, â0â, â1â}, {â1â, â0â, â0â, â1â, â1â}, {â0â, â0â, â0â, â0â, â0â}, {â1â, â0â, â1â, â1â, â0â}}Output: 4Explanation: The image below shows a