3097. Shortest Subarray With OR at Least K II
Problem 跟 3095. Shortest Subarray With OR at Least K I 一模一样,只是问题规模更大。 https://leetcode.cn/problems/shortest-subarray-with-or-...
Problem 跟 3095. Shortest Subarray With OR at Least K I 一模一样,只是问题规模更大。 https://leetcode.cn/problems/shortest-subarray-with-or-...
Problem A 0-indexed array derived with length n is derived by computing the bitwise XOR (⊕) of adjacent values in a binary ar...
Problem You are given two 0-indexed arrays, nums1 and nums2, consisting of non-negative integers. There exists another array,...
Problem Given two positive integers num1 and num2, find the positive integer x such that: x has the same number of set bits ...
Problem You are given a 0-indexed integer array nums, and an integer k. In one operation, you will: Take the two smallest in...
Problem You are given two 0-indexed integer permutations A and B of length n. A prefix common array of A and B is an array C ...
Problem You are given a string s. You can perform the following process on s any number of times: Choose an index i in the s...
Problem A parentheses string is a non-empty string consisting only of '(' and ')'. It is valid if any of the following condit...
Problem The bitwise AND of an array nums is the bitwise AND of all integers in nums. For example, for nums = [1, 5, 3], the ...
Problem Given a string s and an integer k, return true if you can use all the characters in s to construct k palindrome strin...
Problem You are given two string arrays words1 and words2. A string b is a subset of string a if every letter in b occurs in ...
Problem You are given two strings word1 and word2. A string x is called valid if x can be rearranged to have word2 as a prefi...
Problem Given an array of integers, return the maximum sum for a non-empty subarray (contiguous elements) with at most one el...
Problem You have n boxes. You are given a binary string boxes of length n, where boxes[i] is '0' if the iᵗʰ box is empty, and...
Problem Alice manages a company and has rented some floors of a building as office space. Alice has decided some of these flo...
Problem You are given a string s of lowercase English letters and a 2D integer array shifts where shifts[i] = [startᵢ, endᵢ, ...
Problem You are given a string s of lowercase English letters and an integer array shifts of the same length. Call the shift(...
Problem There is an ATM machine that stores banknotes of 5 denominations: 20, 50, 100, 200, and 500 dollars. Initially the AT...
Problem Given a string s, return the number of unique palindromes of length three that are a subsequence of s. Note that even...
Problem You are given a 0-indexed integer array nums of length n. nums contains a valid split at index i if the following are...
Problem We had some 2-dimensional coordinates, like "(1, 3)" or "(2, 0.5)". Then, we removed all commas, ...
Problem You are given an array of intervals, where intervals[i] = [startᵢ, endᵢ] and each startᵢ is unique. The right interva...
Problem You are implementing a program to use as your calendar. We can add a new event if adding the event will not cause a t...
Problem Given an integer array nums, you need to find one continuous subarray such that if you only sort this subarray in non...
Problem You are given a 0-indexed array of strings words and a 2D array of integers queries. Each query queries[i] = [lᵢ, rᵢ]...
Problem You are implementing a program to use as your calendar. We can add a new event if adding the event will not cause a d...
Problem You are given an integer array nums and an array queries where queries[i] = [valᵢ, indexᵢ]. For each query i, first, ...
Problem Given a string s, rearrange the characters of s so that any two adjacent characters are not the same. Return any poss...
Problem You are given an integer matrix isWater of size m x n that represents a map of land and water cells. If isWater[i][j...
Problem Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell. The distance between two cells ...
Problem A company is planning to interview 2n people. Given the array costs where costs[i] = [aCostᵢ, bCostᵢ], the cost of fl...
Problem You are given an m x n binary matrix matrix. You can choose any number of columns in the matrix and flip every cell i...