id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

konstans@stuy.edu apcs1 > listSumEvenIndexes
prev  |  next  |  chance

Return the sum of all the numbers at even positions in the array list.


listSumEvenIndexes([1, 2, 3, 4]) → 4
listSumEvenIndexes([8, 16, 10]) → 18
listSumEvenIndexes([5, 0, -10]) → -5

...Save, Compile, Run (ctrl-enter)

public int listSumEvenIndexes(List<Integer> numsList) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 10 Post-solution available

Copyright Nick Parlante 2017 - privacy