Update Longest_path_of_1s_in_a_matrix