function to calculate the largest connected component
void computeLargestConnectedGrid ( int input [ n ] [ m ] ) { int current_max = INT_MIN ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < m ; j ++ ) { reset_visited ( ) ; COUNT = 0 ;