Mahjong Chain Successfully connect two identical Mahjong tiles by creating a connecting path with a maxi…