The first question is an ordered array, focusing on the law to find an array of relatively simple upper left to lower right is the maximum number of minimum number of termination to look for when reaching the edge parts, namely rows <0 or cols <0