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...
Problem You are given an array pairs, where pairs[i] = [xᵢ, yᵢ], and: There are no duplicates. xᵢ < yᵢ Let ways be the n...
跟 2981. Find Longest Special Substring That Occurs Thrice I 一模一样,只不过 s 的长度上限从 50 增加到 5 * 10⁵。 https://leetcode.com/problems/f...
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...
Problem The chess knight has a unique movement, it may move two squares vertically and one square horizontally, or two square...
Problem You are given an integer n representing the length of an unknown array that you are trying to recover. You are also g...
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 ...
Problem You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse ord...
Problem An array is considered special if every pair of its adjacent elements contains two numbers with different parity. You...
Problem An array is considered special if every pair of its adjacent elements contains two numbers with different parity. You...
Problem You are given coordinates, a string that represents the coordinates of a square of the chessboard. Below is a chessbo...
Problem You are given a 0-indexed 2D integer array of events where events[i] = [startTimeᵢ, endTimeᵢ, valueᵢ]. The iᵗʰ event ...
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...
Problem You are given an integer array nums where the iᵗʰ bag contains nums[i] balls. You are also given an integer maxOperat...
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 ...
Problem You are given an integer array banned and two integers n and maxSum. You are choosing some number of integers followi...
Problem You are given an 8 x 8 matrix representing a chessboard. There is exactly one white rook represented by 'R', some num...
Problem You are given two strings start and target, both of length n. Each string consists only of the characters 'L', 'R', a...
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, ...
Problem There is an 8 x 8 chessboard containing n pieces (rooks, queens, or bishops). You are given a string array pieces of ...
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...
Problem You are given a 0-indexed string s and a 0-indexed integer array spaces that describes the indices in the original st...
Problem You are given two strings, coordinate1 and coordinate2, representing the coordinates of a square on an 8 x 8 chessboa...
Problem Given a sentence that consists of some words separated by a single space, and a searchWord, check if searchWord is a ...
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...
Problem Run-length encoding is a string compression method that works by replacing consecutive identical characters (repeated...
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...
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...
Problem You are given a 0-indexed 2D integer array pairs where pairs[i] = [startᵢ, endᵢ]. An arrangement of pairs is valid if...
Problem You are given an array of positive integers nums. Alice and Bob are playing a game. In the game, Alice can choose eit...
Problem You are given a m x n matrix grid consisting of non-negative integers where grid[row][col] represents the minimum tim...
跟 3250. Find the Count of Monotonic Pairs I 一模一样,只不过 nums[i] 的上限从 50 增加到 1000。 https://leetcode.cn/problems/find-the-count-of...
Problem You are given an array of positive integers nums of length n. We call a pair of non-negative integer arrays (arr1, ar...