2401. Longest Nice Subarray
2226. Maximum Candies Allocated to K Children
2226. Maximum Candies Allocated to K Children
Description
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 number of sub piles , but you cannot merge two piles together.
2594. Minimum Time to Repair Cars
2594. Minimum Time to Repair Cars
Description
You are given an integer array ranks
representing the ranks of some mechanics. ranksi is the rank of the i^th mechanic. A mechanic with a rank r
can repair n cars in r * n^2
minutes.
1824. Minimum Sideway Jumps
653. Two Sum IV - Input is a BST
653. Two Sum IV - Input is a BST
Description
Given the root
of a binary search tree and an integer k
, return true
if there exist two elements in the BST such that their sum is equal to k
, or false
otherwise.
645. Set Mismatch
1861. Rotating the Box
1814. Count Nice Pairs in an Array
1814. Count Nice Pairs in an Array
Description
You are given an array nums
that consists of non-negative integers. Let us define rev(x)
as the reverse of the non-negative integer x
. For example, rev(123) = 321
, and rev(120) = 21
. A pair of indices (i, j)
is nice if it satisfies all of the following conditions:
1199. Minimum Time to Build Blocks
1199. Minimum Time to Build Blocks
Description
You are given a list of blocks, where blocks[i] = t
means that thei
-th block needst
units of time to be built. A block can only be built by exactly one worker.