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

medium

2683. Neighboring Bitwise XOR

Problem A 0-indexed array derived with length n is derived by computing the bitwise XOR (⊕) of adjacent values in a binary ar...

medium

2425. Bitwise XOR of All Pairings

Problem You are given two 0-indexed arrays, nums1 and nums2, consisting of non-negative integers. There exists another array,...

medium

3095. Shortest Subarray With OR at Least K I

Problem You are given an array nums of non-negative integers and an integer k. An array is called special if the bitwise OR o...

easy

2429. Minimize XOR

Problem Given two positive integers num1 and num2, find the positive integer x such that: x has the same number of set bits ...

medium

3066. Minimum Operations to Exceed Threshold Value II

Problem You are given a 0-indexed integer array nums, and an integer k. In one operation, you will: Take the two smallest in...

medium

2657. Find the Prefix Common Array of Two Arrays

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

medium

3065. Minimum Operations to Exceed Threshold Value I

Problem You are given a 0-indexed integer array nums, and an integer k. In one operation, you can remove one occurrence of th...

easy

3414. Maximum Score of Non-overlapping Intervals

Problem You are given a 2D integer array intervals, where intervals[i] = [lᵢ, rᵢ, weightᵢ]. Interval i starts at position lᵢ ...

hard

3223. Minimum Length of String After Operations

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

medium

2116. Check if a Parentheses String Can Be Valid

Problem A parentheses string is a non-empty string consisting only of '(' and ')'. It is valid if any of the following condit...

medium

2275. Largest Combination With Bitwise AND Greater Than Zero

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

medium

1400. Construct K Palindrome Strings

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

medium

3270. Find the Key of the Numbers

Problem You are given three positive integers num1, num2, and num3. The key of num1, num2, and num3 is defined as a four-digi...

easy

916. Word Subsets

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

medium

2185. Counting Words With a Given Prefix

Problem You are given an array of strings words and a string pref. Return the number of strings in words that contain pref as...

easy

3298. Count Substrings That Can Be Rearranged to Contain a String II

Problem 跟 3297. Count Substrings That Can Be Rearranged to Contain a String I 一模一样,只是多了一个注意点: Note that the memory limits in ...

hard

3297. Count Substrings That Can Be Rearranged to Contain a String I

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

medium

3410. Maximize Subarray Sum After Removing All Occurrences of One Element

Problem You are given an integer array nums. You can do the following operation on the array at most once: Choose any intege...

hard

3045. Count Prefix and Suffix Pairs II

Problem 跟 3042. Count Prefix and Suffix Pairs I 一模一样,但单词数量从 50 提升到 10⁵,同时单词的长度也从 10 提升到 10⁵。 https://leetcode.com/problems/co...

hard

3042. Count Prefix and Suffix Pairs I

Problem You are given a 0-indexed string array words. Let’s define a boolean function isPrefixAndSuffix that takes two string...

easy

2264. Largest 3-Same-Digit Number in String

Problem You are given a string num representing a large integer. An integer is good if it meets the following conditions: It...

easy

1408. String Matching in an Array

Problem Given an array of string words, return all strings in words that is a substring of another word. You can return the a...

easy

3019. Number of Changing Keys

Problem You are given a 0-indexed string s typed by a user. Changing a key is defined as using a key different from the last ...

easy

1186. Maximum Subarray Sum with One Deletion

Problem Given an array of integers, return the maximum sum for a non-empty subarray (contiguous elements) with at most one el...

medium

1769. Minimum Number of Operations to Move All Balls to Each Box

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

medium

2274. Maximum Consecutive Floors Without Special Floors

Problem Alice manages a company and has rented some floors of a building as office space. Alice has decided some of these flo...

medium

2381. Shifting Letters II

Problem You are given a string s of lowercase English letters and a 2D integer array shifts where shifts[i] = [startᵢ, endᵢ, ...

medium

848. Shifting Letters

Problem You are given a string s of lowercase English letters and an integer array shifts of the same length. Call the shift(...

medium

2241. Design an ATM Machine

Problem There is an ATM machine that stores banknotes of 5 denominations: 20, 50, 100, 200, and 500 dollars. Initially the AT...

medium

3395. Subsequences with a Unique Middle Mode I

Problem 唯一中间众数子序列。 Given an integer array nums, find the number of subsequences of size 5 of nums with a unique middle mode...

hard

3399. Smallest Substring With Identical Characters II

跟 3398. Smallest Substring With Identical Characters I 一模一样,只不过 s 的长度上限从 1000 增加到 10⁵。 https://leetcode.com/problems/smallest...

hard
1239