If result already exists in the table check if min_value is less than existing value
if table [ i ] [ j ] > 0 and table [ i ] [ j ] < INT_MAX : NEW_LINE INDENT if min_value < table [ i ] [ j ] : NEW_LINE INDENT table [ i ] [ j ] = min_value NEW_LINE DEDENT DEDENT else : NEW_LINE INDENT table [ i ] [ j ] = min_value NEW_LINE DEDENT visited [ i ] [ j ] = 0 NEW_LINE return table [ i ] [ j ] NEW_LINE