All Posts

Leetcode 399: Evaluate Division

You are given a list of equations and their corresponding values, where each equation represents a division between two variables. Your task is to determine the result of several queries asking for the division result of two given variables.

Leetcode 400: Nth Digit

You are given a positive integer n. Your task is to find the nth digit in an infinite sequence of consecutive integers starting from 1. The sequence starts as [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, …].

Leetcode 402: Remove K Digits

Given a string num representing a non-negative integer and an integer k, remove k digits from num such that the remaining number is the smallest possible integer.

Leetcode 406: Queue Reconstruction by Height

You are given an array of people, where each person is represented by two integers: their height hi and the number of people ki in front of them who have a height greater than or equal to hi. Your task is to reconstruct the queue based on these attributes.

Leetcode 416: Partition Equal Subset Sum

Given an integer array, determine if it is possible to partition the array into two subsets with equal sum. Return true if such a partition exists, otherwise return false.

Leetcode 417: Pacific Atlantic Water Flow

You are given an m x n grid representing an island, where each cell contains an integer representing the height above sea level. The island borders both the Pacific and Atlantic Oceans. The Pacific Ocean touches the left and top edges of the grid, and the Atlantic Ocean touches the right and bottom edges. Water can flow from one cell to an adjacent cell if the adjacent cell’s height is less than or equal to the current cell’s height. The task is to find all the cells where water can flow to both oceans.