greatest finds the max number of digits multiplication

greatestProduct(numbers, digits)

Arguments

numbers

Digits to iterate over

digits

Max number of digits to compute

Value

The expected value

Complexity

This function has the following complexity O($n^2$)

Examples

problem8(c(1, 2, 3, 4, 5), 2)
#> Error in problem8(c(1, 2, 3, 4, 5), 2): unused argument (2)
problem8((1:10), 4)
#> Error in problem8((1:10), 4): unused argument (4)
problem8((1:100), 13)
#> Error in problem8((1:100), 13): unused argument (13)