HTMLify
LeetCode - Find Champion I - Python
Views: 358 | Author: abh
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))
Comments

maybe i should have chosen a shorter variable name instead of strongerthancount :D
Reply(Mention)