This commit is contained in:
parent
057ada7c64
commit
9659e510f0
1 changed files with 14 additions and 0 deletions
14
easy/find_champion_i.py
Normal file
14
easy/find_champion_i.py
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
# https://leetcode.com/problems/find-champion-i
|
||||||
|
from typing import List
|
||||||
|
|
||||||
|
class Solution:
|
||||||
|
def findChampion(self, grid: List[List[int]]) -> int:
|
||||||
|
max_sum = -1
|
||||||
|
win = -1
|
||||||
|
for i in range(len(grid)):
|
||||||
|
curr = sum(grid[i])
|
||||||
|
if max_sum < curr:
|
||||||
|
win = i
|
||||||
|
max_sum = curr
|
||||||
|
return win
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue