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 ...
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 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 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 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 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 Given an array of characters chars, compress it using the following algorithm: Begin with an empty string s. For each...
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 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 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 Given two integers a and b, return the sum of the two integers without using the operators + and -. https://leetcode....
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 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 root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as follo...
Problem Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any o...
Problem You have intercepted a secret message encoded as a string of numbers. The message is decoded via the following mappin...
Problem You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed...