Category: math
Given a string s consisting only of 1s and 0s, you can delete any two adjacent letters if they are different. Return the length of the smallest string that …
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 …