If right neighbor is valid and has value less than or equal to current cell 's value
if ( m + 1 < M and adj [ n ] [ m ] >= adj [ n ] [ m + 1 ] and not visit [ n ] [ m + 1 ] ) : NEW_LINE INDENT dfs ( n , m + 1 , visit , adj , N , M ) NEW_LINE DEDENT