Split a Set into Two with Equal Sums and Distinct Numbers January 6, 2021 algorithms, c / c++, math No Comments Given a list of positive integers nums, return whether you can divide the list into two groups a and b such that: The sum of a and the sum … [Continue Reading...]
How to Compute Running Sum of 1d Array using std::partial_sum in C++? June 14, 2020 algorithms, c / c++ No Comments Given an array nums. We define a running sum of an array as runningSum = sum(nums…nums). Return the running sum of nums. Example 1: Input: nums = Output: Explanation: … [Continue Reading...]