LeetCode solutions

3188. Find Champion I

My accepted Python solution to LeetCode problem 3188, Find Champion I, running in 3ms.

  • Difficulty: Easy
  • Python
  • Runtime 3ms
  • Memory 18.1MB

Read the problem on LeetCode View on GitHub

Python

Accepted on LeetCode — runtime 3ms, memory 18.1MB, accepted 2026-01-02.

python
class Solution:
    def findChampion(self, grid: List[List[int]]) -> int:
        n = len(grid)
        for i in range(n):
            is_champion = True
            for j in range(n):
                if i != j and grid[j][i] == 1:
                    is_champion = False
                    break
            if is_champion:
                return i
        return -1

Source