about | help | code help+videos | done | prefs |
Write a method that repeatedly scrambles a string using the idea from the passwordScramble method described in the SL problem. This time, pass in an array of jumps to make. Scramble the string using jumps[0] as the jump amount. Then take that result and scramble it using jumps[1] as the jump amount. Keep doing this for each element in the 'jumps' array. Return the result. You may use your passwordScramble solution as a helper method (in fact you SHOULD do that). test2021_02_25_HL_passwordMegaScramble("I_made_this_too_easy!!!", [5, 3, 3, 2, 7, 2]) → "Iysoatd_s!hatm__ee_!oi!" test2021_02_25_HL_passwordMegaScramble("Yoda_is_a_little_green_Jedi", [7, 5, 3, 5, 7]) → "Ydtniedlioaale_eJsgt___rei_" test2021_02_25_HL_passwordMegaScramble("abcdefghijklmnopqrstuv", [3, 3]) → "ajsencludmvhqfogpbktir" ...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: 290
Copyright Nick Parlante 2017 - privacy