Valid Sudoku — LeetCode

Soren Rood
Jan 2, 2021

Here is the question:

LeetCode #36

The input looks something like this:

input

With this problem, there are 3 main things that we have to do to determine if our board is valid.

  1. Check each square
  2. Check each row
  3. Check each column

I broke these steps down into 3 separate functions for simplicity.

Here is my solution:

https://carbon.now.sh

Execution report:

Faster than 84%

Source code here

Social links here

--

--