HTMLify
LeetCode - Find Champion I - Python
Views: 488 | Author: abh
1 2 3 4 5 6 7 8 9 | class Solution: def findChampion(self, grid: List[List[int]]) -> int: n = len(grid) strongerthancount = [0]*n for i in range(n): for j in range(n): if i != j: strongerthancount[i] += grid[i][j] return strongerthancount.index(max(strongerthancount)) |