about | help | code help+videos | done | prefs |
BalrogScramble accepts a string and an integer, num, as input parameters. The parameter num will be between 2 and half the length of the string. Your first task is to figure out how num determines how the string gets scrambled. Look at the test data and it should be clear! Write a method that performs this scramble. balrogScramble("abcdefghijklmnop", 2) → "acegikmobdfhjlnp" balrogScramble("abcdefghijklmnop", 3) → "adgjmpbehkncfilo" balrogScramble("abcdefghijklmnop", 4) → "aeimbfjncgkodhlp" ...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