Calculate Sum and Product

Asked at Meta · Coding & Leetcode-style Questions · Difficulty: Easy

Implement a function that takes a list of integers and returns an array where the first element is the sum of all integers, and the second element is the product of all integers.

Loading the problem…