All Posts

Leetcode 36: Valid Sudoku

Determine if a 9x9 Sudoku board is valid. A valid Sudoku board follows three rules: Each row, column, and 3x3 sub-box must contain the digits 1-9 without repetition. Only the filled cells need to be validated.

Leetcode 48: Rotate Image

Given an n x n 2D matrix representing an image, rotate the image by 90 degrees clockwise. The rotation should be done in-place, meaning you cannot allocate another 2D matrix.

Leetcode 54: Spiral Matrix

Given an m x n matrix, return all the elements of the matrix in spiral order.

Leetcode 59: Spiral Matrix II

Create an n x n matrix where numbers from 1 to n^2 are arranged in a spiral order starting from the top-left corner.

Leetcode 63: Unique Paths II

A robot starts at the top-left corner of an m x n grid and needs to reach the bottom-right corner. The grid contains obstacles (marked as 1) and empty cells (marked as 0). The robot can only move down or right and cannot pass through cells with obstacles. Determine the number of unique paths to the destination.

Leetcode 64: Minimum Path Sum

Given an m x n grid filled with non-negative integers, find a path from the top-left to the bottom-right corner that minimizes the sum of all numbers along the way. The robot can only move either right or down at each step.