C # program to color a grid such that all same color cells are connected either horizontally or vertically
using System ; using System . Collections . Generic ; class GFG { static void solve ( List < int > arr , int r , int c ) {