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

 

srp4379@lausd.net chapter10 > changeList
prev  |  next  |  chance

public List<String> changeList(List<String> list)

Given a list of Strings, change all strings that are alphabetically between "daddy" and "gaby" by replacing their first letters with "Z". The method should be CASE-INSENSITIVE, i.e. "FraNK" should be changed to "ZraNK".


changeList(["ark", "bad", "club", "drink", "easy", "floor", "green"]) → ["ark", "bad", "club", "Zrink", "Zasy", "Zloor", "green"]
changeList(["aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh"]) → ["aa", "bb", "cc", "Zd", "Ze", "Zf", "gg", "hh"]
changeList(["abc", "bcd", "def", "efg", "fgh", "ghi"]) → ["abc", "bcd", "Zef", "Zfg", "Zgh", "ghi"]

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

public List<String> changeList(List<String> list) { }

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

Copyright Nick Parlante 2017 - privacy