All Posts

Leetcode 62: Unique Paths

A robot starts at the top-left corner of an m x n grid and can only move right or down. Determine the total number of unique paths it can take to reach the bottom-right 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.

Leetcode 71: Simplify Path

Given an absolute path for a Unix-style file system, simplify the path by following Unix file system rules. Handle ‘.’ and ‘..’ as current and parent directories, and multiple slashes as a single slash. Return the simplified canonical path.

Leetcode 72: Edit Distance

Given two strings str1 and str2, your task is to determine the minimum number of operations required to transform str1 into str2. The allowed operations are: Insert a character, Delete a character, and Replace a character.

Leetcode 73: Set Matrix Zeroes

You are given an m x n matrix of integers. Whenever an element in the matrix is 0, you need to set all elements in the corresponding row and column to 0, but the operation must be done in place. This means you cannot use extra space for another matrix.