Reduce & Backtrack
Perl Weekly Challenge 191 Task I Another week, another opportunity to participate in the weekly Perl Challenge. The first task was self explanatory if you read the code. With use of reduce() from functools, it makes for very efficient and readable code. The logic is simple to figure out, since the sum of the n items in the list cannot be greater than the largest item. For example: Take the following list: [1, 2, 3, 4].