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


Map-1 > mapAB
prev  |  next  |  chance

Modify and return the given map as follows: for this problem the map may or may not contain the "a" and "b" keys. If both keys are present, append their 2 string values together and store the result under the key "ab".

mapAB({"a": "Hi", "b": "There"}) → {"a": "Hi", "ab": "HiThere", "b": "There"}
mapAB({"a": "Hi"}) → {"a": "Hi"}
mapAB({"b": "There"}) → {"b": "There"}

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

public Map<String, String> mapAB(Map<String, String> map) { }

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

Copyright Nick Parlante 2017 - privacy