LeetCode – Valid Sudoku

So there is a problem called Valid Sudoku on LeetCode, problem number 36. Let’s go through the problem. Also, good to note, I will write this is C#. Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: Each row must contain the digits 1-9 without repetition. Each column must contain …

LeetCode – Reshape the Matrix

This problem comes from LeetCode: https://leetcode.com/problems/reshape-the-matrix, “Reshape the Matrix”. You are given an m x n matrix mat and two integers r and c representing the number of rows and the number of columns of the wanted reshaped matrix. The reshaped matrix should be filled with all the elements of the original matrix in the same row-traversing order as they were. If the reshape operation …