-
Notifications
You must be signed in to change notification settings - Fork 0
Kazi
Anthony Nandaa edited this page May 24, 2017
·
1 revision
Using filter and reduce functions, write a function sumEven(A)
,
that takes an array, A, and sums all the even number is that array and returns sum as the result.
Write a function max_pair(A)
that takes a list A, and returns the 2 integers (a tuple) in the array, A that make up a pair with the highest sum.
e.g. max_pair([10, 5, 6, 3, 9])
returns a tuple (Python or array for any other language) 10, 9