3396. Minimum Number of Operations to Make Elements in Array Distinct
You are given an integer array nums. You need to ensure that the elements in the array are distinct. To achieve this, […]
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
You are given a 0-indexed integer array nums. Return the maximum value over all triplets of indices (i, j, k) such that i < j < k. If
You are given a 0-indexed integer array nums. Return the maximum value over all triplets of indices (i, j, k) such that i < j < k.
You are given a 0-indexed 2D integer array questions where questions[i] = [pointsi, brainpoweri]. The array describes the questions of an exam, where you have
You have k bags. You are given a 0-indexed integer array weights where weights[i] is the weight of the ith marble. You are also given the integer k. Divide the marbles
You are given a string s. We want to partition the string into as many parts as possible so that each
You are given a 2D integer grid of size m x n and an integer x. In one operation, you can add x to or subtract x from any element in
You are given a positive integer days representing the total number of days an employee is available for work (starting from day
You are given a string word and a non-negative integer k. Return the total number of substrings of word that contain every vowel (‘a’, ‘e’, ‘i’, ‘o’, and ‘u’) at least once