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

 

orion.a.smith@gmail.com apcsa-lists > apcsaListBackwardsEvens
prev  |  next  |  chance

Given an ArrayList of Integers, construct and return a new ArrayList of Integer values made by traversing the input in reverse order and selecting only the elements with even values. Be aware: nulls are a possibility in inputs!


apcsaListBackwardsEvens([1, 2, 3, 4, 5, 6]) → [6, 4, 2]
apcsaListBackwardsEvens([6, 5, 4, 3, 2, 1]) → [2, 4, 6]
apcsaListBackwardsEvens([1, 3, null, 1]) → []

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

public ArrayList<Integer> apcsaListBackwardsEvens(ArrayList<Integer> lst) { }

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: 230

Copyright Nick Parlante 2017 - privacy