122. Best Time to Buy and Sell Stock II

Problem You are given an integer array prices where prices[i] is the price of a given stock on the iᵗʰ day. On each day, you ...

medium

1792. Maximum Average Pass Ratio

Problem There is a school that has classes of students and each class will be having a final exam. You are given a 2D integer...

medium

1338. Reduce Array Size to The Half

Problem You are given an integer array arr. You can choose a set of integers and remove all the occurrences of these integers...

medium

2809. Minimum Time to Make Array Sum At Most x

Problem You are given two 0-indexed integer arrays nums1 and nums2 of equal length. Every second, for all indices 0 <= i &...

hard difficult

2762. Continuous Subarrays

Problem You are given a 0-indexed integer array nums. A subarray of nums is called continuous if: Let i, i + 1, …, j be the ...

medium

3266. Final Array State After K Multiplication Operations II

Problem You are given an integer array nums, an integer k, and an integer multiplier. You need to perform k operations on num...

hard

2593. Find Score of an Array After Marking All Elements

Problem You are given an array nums consisting of positive integers. Starting with score = 0, apply the following algorithm: ...

medium

3264. Final Array State After K Multiplication Operations I

Problem You are given an integer array nums, an integer k, and an integer multiplier. You need to perform k operations on num...

easy

2558. Take Gifts From the Richest Pile

Problem You are given an integer array gifts denoting the number of gifts in various piles. Every second, you do the followin...

easy

2931. Maximum Spending After Buying Items

Problem You are given a 0-indexed m * n integer matrix values, representing the values of m * n different items in m differen...

hard

2699. Modify Graph Edge Weights

Problem You are given an undirected weighted connected graph containing n nodes labeled from 0 to n - 1, and an integer array...

hard difficult

2779. Maximum Beauty of an Array After Applying Operation

Problem You are given a 0-indexed array nums and a non-negative integer k. In one operation, you can do the following: Choos...

medium

2717. Semi-Ordered Permutation

Problem You are given a 0-indexed permutation of n integers nums. A permutation is called semi-ordered if the first number eq...

easy

1719. Number Of Ways To Reconstruct A Tree

Problem You are given an array pairs, where pairs[i] = [xᵢ, yᵢ], and: There are no duplicates. xᵢ < yᵢ Let ways be the n...

hard difficult todo

2982. Find Longest Special Substring That Occurs Thrice II

跟 2981. Find Longest Special Substring That Occurs Thrice I 一模一样,只不过 s 的长度上限从 50 增加到 5 * 10⁵。 https://leetcode.com/problems/f...

medium

2981. Find Longest Special Substring That Occurs Thrice I

Problem You are given a string s that consists of lowercase English letters. A string is called special if it is made up of o...

medium

935. Knight Dialer

Problem The chess knight has a unique movement, it may move two squares vertically and one square horizontally, or two square...

medium

1982. Find Array Given Subset Sums

Problem You are given an integer n representing the length of an unknown array that you are trying to recover. You are also g...

hard difficult

954. Array of Doubled Pairs

Problem Given an integer array of even length arr, return true if it is possible to reorder arr such that arr[2 * i + 1] = 2 ...

medium

2. Add Two Numbers

Problem You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse ord...

medium

3152. Special Array II

Problem An array is considered special if every pair of its adjacent elements contains two numbers with different parity. You...

medium

3151. Special Array I

Problem An array is considered special if every pair of its adjacent elements contains two numbers with different parity. You...

easy

1812. Determine Color of a Chessboard Square

Problem You are given coordinates, a string that represents the coordinates of a square of the chessboard. Below is a chessbo...

easy

2054. Two Best Non-Overlapping Events

Problem You are given a 0-indexed 2D integer array of events where events[i] = [startTimeᵢ, endTimeᵢ, valueᵢ]. The iᵗʰ event ...

medium todo

782. Transform to Chessboard

Problem You are given an n x n binary grid board. In each move, you can swap any two rows with each other, or any two columns...

hard

1760. Minimum Limit of Balls in a Bag

Problem You are given an integer array nums where the iᵗʰ bag contains nums[i] balls. You are also given an integer maxOperat...

medium

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
1345679