Ad
  • Custom User Avatar

    Extra E aside does anyone know why the expected result is different?

    Input WEAREDISCOVEREDFLEEATONCE rails = 2.

    Expected was WADCEFACTLROIREESVEEOENED but my result was WAEICRLTEEOSDREEICVDEOAFE

    Manually working this out also gave me

    W A E I C V R D L E T N E
     E R D S O E E F E A O C
    
  • Custom User Avatar

    Hi, there is a small error in the rail that you wrote above. If you look closely, there is an extra "E" in your "DISCOVEREED". I hope this helps and happy coding (sorry, I see that this question is from a month ago, but I just completed the exercise).

  • Custom User Avatar

    Can someone explain how this output is the correct answer:

    Input: WEAREDISCOVEREDFLEEATONCE

    with n=2

    the expected output is WADCEFACTLROIREESVEEOENED

    but even working it out manually I find the answer to be WAEICVRDLETNEERDSOEEFEAOC (as take every other letter and put on one other rail)?
    eg

    W A E I C V R E F E A O C
     E R D S O E E D L E T N E