Qualtrics Interview Question

Paint fill new color algorithm. Its based on Matrix BFS Algorith, similar to finding islands in give matrix map.