标签:最小值 参考 traints etc bsp distinct mat com ble
problem
1380. Lucky Numbers in a Matrix
在矩阵中,如果一个数既是它所在行的最小值,又是它所在列的最大值,则称这个数为幸运数。找到矩阵中所有的幸运数。
Constraints
All elements in the matrix are distinct.
solution1:
每次先找到一行的最小值,再判断它是不是所在列的最大值。
code
注意
1. 如何在计算得到行最小值的同时判断是否是所在列的最大值;
参考
1. leetcode_1380. Lucky Numbers in a Matrix;
完
【leetcode_easy_array】1380. Lucky Numbers in a Matrix
标签:最小值 参考 traints etc bsp distinct mat com ble
原文地址:https://www.cnblogs.com/happyamyhope/p/13305338.html