id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

orion.a.smith@gmail.com apcsa-encryption > apcsaDecryptRearrangeWords
prev  |  next  |  chance

Given a ciphertext String, create and return the plaintext by reversing the rearrangeWords cipher from the prior problem. Thus, the ciphertext "1 3 5 7 9 8 6 4 2 0" becomes the plaintext "0 1 2 3 4 5 6 7 8 9". The original even indexes are at the end, in reversed order.


apcsaDecryptRearrangeWords("it eat") → "eat it"
apcsaDecryptRearrangeWords("1 3 5 7 9 8 6 4 2 0") → "0 1 2 3 4 5 6 7 8 9"
apcsaDecryptRearrangeWords("shalt take the Pin. shalt count three. more. less. shalt the thou count, the of counting be Four thou count, either thou excepting thou proceed three. is out. the three, the number, reached, lobbest thy Hand of towards foe, being in sight, snuff it. shall My naughty who, thy Antioch Grenade Holy thou then, be third being number Once right Five to then that two, count nor not shalt three. shall the number and shalt number be Three No No to thou Then, Holy out thou First") → "First shalt thou take out the Holy Pin. Then, shalt thou count to three. No more. No less. Three shalt be the number thou shalt count, and the number of the counting shall be three. Four shalt thou not count, nor either count thou two, excepting that thou then proceed to three. Five is right out. Once the number three, being the third number, be reached, then, lobbest thou thy Holy Hand Grenade of Antioch towards thy foe, who, being naughty in My sight, shall snuff it."

...Save, Compile, Run (ctrl-enter)

public String apcsaDecryptRearrangeWords(String ciphertext) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 230

Copyright Nick Parlante 2017 - privacy