| about | help | code help+videos | done | prefs |
Write a method that takes the String given and makes it half the length. Once you did that take it and reverse the order. Then take the last letter and repeat it the amount of times given (the int) reverseAndExtend("help", 2) → "plehh" reverseAndExtend("and there he is", 5) → "si eh ereht dnaaaaa" reverseAndExtend("wowie", 34) → "eiwowwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww" ...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: 100 Post-solution available
Copyright Nick Parlante 2017 - privacy