about | help | code help+videos | done | prefs |
foldInHalf
Return a new string where the first half of the characters are swapped with the second half of the characters while keeping the middle character in the middle. For example if the given str is "TodayIsn'tWindy", get the first half which is "TodayIs", then get the second half which is "'tWindy" and return a new string as "'tWindynTodayIs", and n stays in the middle foldInHalf("") → "" foldInHalf("1") → "1" foldInHalf("e%!") → "!%e" ...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: 105 Post-solution available
Copyright Nick Parlante 2017 - privacy