2025-08-22 10:44:20 +0000 UTC
Find Champion I
Categories:
Links
Code
class Solution:
def findChampion(self, grid: List[List[int]]) -> int:
loses = [False] * len(grid)
for row in range(len(grid)):
for col in range(len(grid)):
if row == col:
continue
val = grid[row][col]
if val == 1:
loses[col] = True
else:
loses[row] = True
return loses.index(False)