Driver Code
public static void Main ( string [ ] args ) { int r = 3 , c = 5 ; List < int > arr = new List < int > ( ) ; arr . Add ( 1 ) ; arr . Add ( 2 ) ; arr . Add ( 3 ) ; arr . Add ( 4 ) ; arr . Add ( 5 ) ; solve ( arr , r , c ) ; } }