diff --git a/easy/find_champion_i.py b/easy/find_champion_i.py new file mode 100644 index 0000000..9681bff --- /dev/null +++ b/easy/find_champion_i.py @@ -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 +