← Back to challenges

Clockwise Decipher

PythonHardalgorithmscryptographylogicstrings

Instructions

In Clockwise Cipher, encoding is done by placing message characters in the corner cells of a square and moving in a clockwise direction. The detailed description of the encoding algorithm is provided by Mubashir in his challenge. You are encouraged to solve that one first.

In this challenge, the function is given the encoded message. Create a reversed solution to retrieve the original message.

Examples

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

clockwise_decipher("M ParsoMc nhteat") ➞ "Matt MacPherson"

Notes

Strip white spaces on the right of the resulting string, because they were added during the encoding.

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.