Category: math
Given a list of integers, find the largest product of two distinct elements. Example 1 Input nums = Output 35 Explanation 35 is the largest product that can be …
The Fibonacci sequence goes like this: 1, 1, 2, 3, 5, 8, 13, 21, 34, … The next number can be found by adding up the two numbers before …
Given a positive integer num, return the sum of its digits. Bonus: Can you do it without using strings? Example 1 Input num = 123 Output 6 Explanation Since …
Given a non-empty array nums containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is …
You are given two arrays rowSum and colSum of non-negative integers where rowSum is the sum of the elements in the ith row and colSum is the sum of …