2444. Count Subarrays With Fixed Bounds
You are given an integer array nums and two integers minK and maxK. A fixed-bound subarray of nums is a subarray that satisfies the following conditions: The minimum value in the […]
You are given an integer array nums and two integers minK and maxK. A fixed-bound subarray of nums is a subarray that satisfies the following conditions: The minimum value in the […]
You are given a 0-indexed integer array nums, an integer modulo, and an integer k. Your task is to find the count of subarrays that
You are given an array nums consisting of positive integers. We call a subarray of an array complete if the following condition is satisfied: The number
You are given an integer n. Each number from 1 to n is grouped according to the sum of its digits. Return the number of groups
You are given two integers n and maxValue, which are used to describe an ideal array. A 0-indexed integer array arr of length n is considered ideal if the following conditions hold: Every arr[i] is
You are given a 0-indexed array of n integers differences, which describes the differences between each pair of consecutive integers of a hidden sequence of length (n + 1). More formally, call
There is a forest with an unknown number of rabbits. We asked n rabbits “How many rabbits have the same color
Given a 0-indexed integer array nums of length n and an integer k, return the number of pairs (i, j) where 0 <= i < j < n, such that nums[i] == nums[j] and (i *
You are given an integer array nums. You need to ensure that the elements in the array are distinct. To achieve this,
Given an integer array nums, return true if you can partition the array into two subsets such that the sum of the elements
Given a set of distinct positive integers nums, return the largest subset answer such that every pair (answer[i], answer[j]) of elements in this subset satisfies: answer[i] %
The XOR total of an array is defined as the bitwise XOR of all its elements, or 0 if the array is empty. For example, the XOR total of the