Don Juan Arun

Arun

This week’s code-crunch was straight from a real-life love story! Arun had the best answer to the code-crunch on

A guy is seeing his sister’s friend secretly. He would sometimes text her but she wouldn’t reply if his sister is around, as she is afraid she might look at her messages. So he decides to use a simple encryption method to encrypt his messages.

According to the encryption method:

1 letter words are sent as is. eg.: I => I, u => u

2 letter words are shifted one letter to the right. eg.: is => si, me => em, to => ot

3 or more letter words are shifted two letters to the right. eg.: are => rea, you => ouy, meet => etme, movie => iemov

Space is any alphabet repeated thrice. eg.: uuu, xxx, ppp are Spaces.

Given an encrypted string, write code to find the decrypted string/message.

Sample Input: reaoooummmeefrkkkhttonigooo

Expected Output: are u free tonight

Related articles
Contact us

Partner with Us for Comprehensive IT

We’re happy to answer any questions you may have and help you determine which of our services best fit your needs.

Your benefits:
What happens next?
1

We schedule a call at your convenience 

2

We do a discovery & consulting meeting 

3

We prepare a proposal 

Schedule a Free Consultation