Skip to main content

Posts

Leetcode 37: Sudoku Solver

  1. Problem Statement (Simple Explanation): You are given a  9×9  Sudoku board, partially filled, with: Digits '1'–'9' for filled cells. '.' for empty cells. You must: Fill the empty cells  so that the final board is a  valid Sudoku solution : Each digit 1–9 appears exactly once in each  row . Each digit 1–9 appears exactly once in each  column . Each digit 1–9 appears exactly once in each  3×3 sub-box . The input is guaranteed to have  exactly one solution . You must modify the board  in-place . 2. Example: Input board: [   ["5","3",".",".","7",".",".",".","."],   ["6",".",".","1","9","5",".",".","."],   [".","9","8",".",".",".",".","6","."],   ["8",".",".","....
Recent posts

Leetcode 36: Valid Sudoku

  1. Problem Statement (Simple Explanation): You’re given a  9×9  Sudoku board (char[9][9]), partially filled. You must determine if the board is  valid  according to Sudoku rules for the  filled cells only : Each  row  must contain digits 1-9  without repetition . Each  column  must contain digits 1-9  without repetition . Each of the nine  3×3 sub-boxes  must contain digits 1-9  without repetition . Notes: Empty cells are denoted by '.' and can be ignored. A valid board might not be solvable; you only validate current filled cells. 2. Examples: Example 1 (Valid): [["5","3",".",".","7",".",".",".","."] ,["6",".",".","1","9","5",".",".","."] ,[".","9","8",".",".",".",".","6","."] ,["8",".",...