about | help | code help+videos | done | prefs |
Given an ArrayList of Strings and a target String, return an ArrayList of String values which only has entries containing the target String in them somewhere. Try doing this problem first with an indexed for loop using the remove() method of ArrayList. After you solve that, try reversing the direction of the loop control variable. After you solve it a second time, try it again using an enhanced for (a.k.a. a for-each) loop. apcsaListFindTarget(["out of time and out of", "darkness", "sometimes will occur", "the light"], "me") → ["out of time and out of", "sometimes will occur"] apcsaListFindTarget(["hey ho", "ha ha", "har har", "the Hardy boys"], "ha") → ["ha ha", "har har"] apcsaListFindTarget(["start", "middle", "end"], "e") → ["middle", "end"] ...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: 220
Copyright Nick Parlante 2017 - privacy