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