C # program to find maximum sum by selecting a element from n arrays
using System ; class GFG { static int M = 4 ; static void sort ( ref int [ , ] a , int row , int n ) { for ( int i = 0 ; i < M - 1 ; i ++ ) { if ( a [ row , i ] > a [ row , i + 1 ] ) { int temp = a [ row , i ] ; a [ row , i ] = a [ row , i + 1 ] ; a [ row , i + 1 ] = temp ; } } }