698. Partition to K Equal Sum Subsets
698. Partition to K Equal Sum Subsets
Description
Given an integer array nums
and an integer k
, return true
if it is possible to divide this array into k
non-empty subsets whose sums are all equal.
698. Partition to K Equal Sum Subsets
Given an integer array nums
and an integer k
, return true
if it is possible to divide this array into k
non-empty subsets whose sums are all equal.
2964. Number of Divisible Triplet Sums
Given a 0-indexed integer array nums
and an integer d
, return the number of triplets (i, j, k)
such that i < j < k
and (nums[i] + nums[j] + nums[k]) % d == 0
.
123. Best Time to Buy and Sell Stock III
You are given an array prices
where prices[i]
is the price of a given stock on the i^th
day.
244. Shortest Word Distance II
Design a data structure that will be initialized with a string array, and then it should answer queries of the shortest distance between two different strings from the array.