2290. Minimum Obstacle Removal to Reach Corner
Problem You are given a 0-indexed 2D integer array grid of size m x n. Each cell has one of two values: 0 represents an empt...
Problem You are given a 0-indexed 2D integer array grid of size m x n. Each cell has one of two values: 0 represents an empt...
Problem Given an array of characters chars, compress it using the following algorithm: Begin with an empty string s. For each...
Problem Given two strings s and goal, return true if and only if s can become goal after some number of shifts on s. A shift ...
Problem A sentence is a list of words that are separated by a single space with no leading or trailing spaces. For example, ...
Problem A fancy string is a string where no three consecutive characters are equal. Given a string s, delete the minimum poss...
Problem You are given an array of integers nums of length n and a positive integer k. The power of an array is defined as: I...
跟 3254. Find the Power of K-Size Subarrays I 一模一样,只不过 n 的上限从 500 增加到 10⁵。 https://leetcode.cn/problems/find-the-power-of-k-si...
Problem You are given two positive integers x and y, denoting the number of coins with values 75 and 10 respectively. Alice a...
Problem Given a non-negative integer c, decide whether there’re two integers a and b such that a² + b² = c. https://leetcode....
Problem There is a circle of red and blue tiles. You are given an array of integers colors and an integer k. The color of til...
Problem In LeetCode Store, there are n items to sell. Each item has a price. However, there are some special offers, and a sp...
Problem You are given two positive integers n and k. You can choose any bit in the binary representation of n that is equal t...
Problem You are given two integer arrays energyDrinkA and energyDrinkB of the same length n by a futuristic sports scientist....
Problem There are n teams numbered from 0 to n - 1 in a tournament; each team is also a node in a DAG. You are given the inte...
Problem There are n teams numbered from 0 to n - 1 in a tournament. Given a 0-indexed 2D boolean matrix grid of size n * n. F...
Problem A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alpha...
Problem There is a circle of red and blue tiles. You are given an array of integers colors. The color of tile i is represente...
Problem A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecti...
Problem You are given an array prices where prices[i] is the price of a given stock on the iᵗʰ day. You want to maximize your...
Problem Given two integers a and b, return the sum of the two integers without using the operators + and -. https://leetcode....
Problem Given two strings s and t, return true if t is an anagram of s, and false otherwise. An anagram is a word or phrase ...
Problem You are given a network of n nodes, labeled from 1 to n. You are also given times, a list of travel times as directed...
Problem Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements o...
Problem Given a binary search tree (BST), find the lowest common ancestor (LCA) node of two given nodes in the BST. According...
Problem Given an array of distinct integers nums and a target integer target, return the number of possible combinations that...
Problem Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder i...
Problem You have k lists of sorted integers in non-decreasing order. Find the smallest range that includes at least one numbe...
Problem Given the root of a binary tree, return its maximum depth. A binary tree’s maximum depth is the number of nodes along...
Problem Given the root of a binary search tree, and an integer k, return the kᵗʰ smallest value (1-indexed) of all the values...
Problem Given the root of a binary tree, return the level order traversal of its nodes’ values. (i.e., from left to right, le...
Problem Given two strings text1 and text2, return the length of their longest common subsequence. If there is no common subse...
Problem Given the roots of two binary trees p and q, write a function to check if they are the same or not. Two binary trees ...