about | help | code help+videos | done | prefs |
An array list contains the ages of married couples in a village. The ages are listed in pairs, so if there are two couples, ages 50, 52 and 35, 30 they would be listed in the array list as {50, 52, 35, 30}. The village considers the wisest couple to be the one with the highest combined age. Return the combined age of the wisest couple. There will be an even number of elements in the array list. wiseGuys([20, 18]) → 38 wiseGuys([30, 33, 40, 21]) → 63 wiseGuys([25, 25, 30, 29, 60, 62]) → 122 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy