← Back to challenges

Decipher Text Encoded with Clockwise Square Technique

PythonHardalgorithmscryptographylogic

Instructions

Mubashir Hassan recently published Clockwise Cipher. The purpose of this challenge is to take text encrypted by this technique and restore the original text.

Examples

decipher_square("Ms ussahr nHaaib") ➞ "Mubashir Hassan"

decipher_square("Eisadng  tm    i   zbia a") ➞ "Innokodakademija is amazing"

decipher_square("acer") ➞ "acre"

Notes

  • Length of the input ciphertext is always a positive square at least four characters long.
  • The original text to be produced will never have trailing spaces.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.