Ctrl K

Misprinted Bingo Card

Easy
A bingo card is a square table board of size n × n. It should show every number from 1 to n² exactly once. The printer made a mistake: one number was printed twice, and so another number is missing from the card. Return [repeated, missing].
Example 1
board=[[3, 1], [3, 2]] → [3, 4]

Numbers 1 to 4: 3 is printed twice and 4 is missing. The answer is [3, 4].

Example 2
board=[[5, 8, 1], [7, 2, 9], [4, 6, 5]] → [5, 3]

5 appears twice and 3 is missing.

Constraints
  • 2 ≤ n ≤ 50, board is an n × n table
  • 1 ≤ board[i][j] ≤ n²
  • Exactly one number from 1..n² appears twice, exactly one is missing, and every other number appears once
Have you seen this problem in a real interview?
Solved by0
Tried by0
Submissions0
Acceptance—
Topics
Similar problemsMagic 3×3 Blocks MediumPrimes Along Grid Rays MediumThe Lost Ticket EasyShadows of Block Towers EasySurface of Cube Towers Easy
loading Python…
Input
board=[[3, 1], [3, 2]]
Expected
[3, 4]

Run checks the first 3 tests in your browser. Submit checks all 59 tests on the server, hidden ones included.