about | help | code help+videos | done | prefs |
Given an array of scores, compute the int average of the first half and the second half, and return whichever is larger. The second half begins at index length/2. The array length will be at least 2. Normally you would compute averages with doubles, but here we use ints so the expected results are exact. scoresAverage([2, 2, 4, 4]) → 4 scoresAverage([4, 4, 4, 2, 2, 2]) → 4 scoresAverage([3, 4, 5, 1, 2, 3]) → 4 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 201 Post-solution available
Copyright Nick Parlante 2017 - privacy