1335 Maximum Candies Allocated To K Children
Maximum Candies Allocated to K Children You are given a 0-indexed integer array candies. Each element in the array denotes a pile of candies of size candies[i]. You can divide each pile into any ...
Maximum Candies Allocated to K Children You are given a 0-indexed integer array candies. Each element in the array denotes a pile of candies of size candies[i]. You can divide each pile into any ...
Zero Array Transformation II You are given an integer array nums of length n and a 2D array queries where queries[i] = [li, ri, vali]. Each queries[i] represents the following action on nums: D...
Create Hello World Function Write a function createHelloWorld. It should return a new function that always returns ”Hello World”. Example 1: **Input:** args = [] **Output:** "Hello World" **E...
Maximum Count of Positive Integer and Negative Integer Given an array nums sorted in non-decreasing order, return the maximum between the number of positive integers and the number of negative in...
Number of Substrings Containing All Three Characters Given a string s consisting only of characters a, b and c. Return the number of substrings containing at least one occurrence of all these ch...
Count of Substrings Containing Every Vowel and K Consonants II You are given a string word and a non-negative integer k. Return the total number of substrings of word that contain every vowel (‘...
Minimum Recolors to Get K Consecutive Black Blocks You are given a 0-indexed string blocks of length n, where blocks[i] is either ‘W’ or ‘B’, representing the color of the ith block. The characte...
Closest Prime Numbers in Range Given two positive integers left and right, find the two integers num1 and num2 such that: left <= num1 < num2 <= right . Both num1 and num2 are prime num...
Count Total Number of Colored Cells There exists an infinitely large two-dimensional grid of uncolored unit cells. You are given a positive integer n, indicating that you must do the following ro...
Check if Number is a Sum of Powers of Three Given an integer n, return true if it is possible to represent *n as the sum of distinct powers of three.* Otherwise, return false. An integer y is a ...