688. Knight Probability in Chessboard

Problem On an n x n chessboard, a knight starts at the cell (row, column) and attempts to make exactly k moves. The rows and ...

medium

2554. Maximum Number of Integers to Choose From a Range I

Problem You are given an integer array banned and two integers n and maxSum. You are choosing some number of integers followi...

medium

999. Available Captures for Rook

Problem You are given an 8 x 8 matrix representing a chessboard. There is exactly one white rook represented by 'R', some num...

easy

2337. Move Pieces to Obtain a String

Problem You are given two strings start and target, both of length n. Each string consists only of the characters 'L', 'R', a...

medium

3001. Minimum Moves to Capture The Queen

Problem There is a 1-indexed 8 x 8 chessboard containing 3 pieces. You are given 6 integers a, b, c, d, e, and f where: (a, ...

medium

2056. Number of Valid Move Combinations On Chessboard

Problem There is an 8 x 8 chessboard containing n pieces (rooks, queens, or bishops). You are given a string array pieces of ...

hard

2825. Make String a Subsequence Using Cyclic Increments

Problem You are given two 0-indexed strings str1 and str2. In an operation, you select a set of indices in str1, and for each...

medium

2109. Adding Spaces to a String

Problem You are given a 0-indexed string s and a 0-indexed integer array spaces that describes the indices in the original st...

medium

3274. Check if Two Chessboard Squares Have the Same Color

Problem You are given two strings, coordinate1 and coordinate2, representing the coordinates of a square on an 8 x 8 chessboa...

easy

1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence

Problem Given a sentence that consists of some words separated by a single space, and a searchWord, check if searchWord is a ...

easy

52. N-Queens II

Problem The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each oth...

hard

1531. String Compression II

Problem Run-length encoding is a string compression method that works by replacing consecutive identical characters (repeated...

hard difficult

1346. Check If N and Its Double Exist

Problem Given an array arr of integers, check if there exist two indices i and j such that : i != j 0 <= i, j < arr.le...

easy

51. N-Queens

Problem The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each oth...

hard

2097. Valid Arrangement of Pairs

Problem You are given a 0-indexed 2D integer array pairs where pairs[i] = [startᵢ, endᵢ]. An arrangement of pairs is valid if...

hard todo

3232. Find if Digit Game Can Be Won

Problem You are given an array of positive integers nums. Alice and Bob are playing a game. In the game, Alice can choose eit...

easy

2577. Minimum Time to Visit a Cell In a Grid

Problem You are given a m x n matrix grid consisting of non-negative integers where grid[row][col] represents the minimum tim...

hard

3251. Find the Count of Monotonic Pairs II

跟 3250. Find the Count of Monotonic Pairs I 一模一样,只不过 nums[i] 的上限从 50 增加到 1000。 https://leetcode.cn/problems/find-the-count-of...

hard

3250. Find the Count of Monotonic Pairs I

Problem You are given an array of positive integers nums of length n. We call a pair of non-negative integer arrays (arr1, ar...

hard

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...

hard

443. String Compression

Problem Given an array of characters chars, compress it using the following algorithm: Begin with an empty string s. For each...

medium

796. Rotate String

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 ...

easy

2490. Circular Sentence

Problem A sentence is a list of words that are separated by a single space with no leading or trailing spaces. For example, ...

easy

1957. Delete Characters to Make Fancy String

Problem A fancy string is a string where no three consecutive characters are equal. Given a string s, delete the minimum poss...

easy

3254. Find the Power of K-Size Subarrays I

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...

medium

3255. Find the Power of K-Size Subarrays II

跟 3254. Find the Power of K-Size Subarrays I 一模一样,只不过 n 的上限从 500 增加到 10⁵。 https://leetcode.cn/problems/find-the-power-of-k-si...

medium

3222. Find the Winning Player in Coin Game

Problem You are given two positive integers x and y, denoting the number of coins with values 75 and 10 respectively. Alice a...

easy

633. Sum of Square Numbers

Problem Given a non-negative integer c, decide whether there’re two integers a and b such that a² + b² = c. https://leetcode....

medium

3208. Alternating Groups II

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...

medium

638. Shopping Offers

Problem In LeetCode Store, there are n items to sell. Each item has a price. However, there are some special offers, and a sp...

medium

3226. Number of Bit Changes to Make Two Integers Equal

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...

easy

3259. Maximum Energy Boost From Two Drinks

Problem You are given two integer arrays energyDrinkA and energyDrinkB of the same length n by a futuristic sports scientist....

medium
15678910