Comments on Beaver Code Decryption
Post
Beaver Code Decryption
Credit
This challenge is taken with permission from https://www.mysterytwisterc3.org/en/challenges/level-1/beaver-code
Description
The encryption method is as follows:
The plaintext is divided into two halves, odd positions and even positions.
Example: 'CRYPTO' -> ['CYT','RPO']
This is then applied recursively to both halves, until each part is two letters or less. The parts are then merged.
'CRYPTO' -> ['CYT','RPO'] -> [['CT','Y'], ['RO','P']] -> 'CTYROP'
Challenge
Given a string encrypted with this method, decrypt it.
Valid input formats: ['CTYROP'], 'CTYROP'
Test cases
CTYROP -> CRYPTO
EOYCTNNPRI -> ENCRYPTION
RUOENFSEAFMRDHT -> RANDOMSTUFFHERE
Note: the encryption of the last test case is the same as the decryption, make sure you're decrypting!
BQN, 24 bytesSBCS ``` {g⊔⁼𝕊¨ …
3y ago
Solutions by ngn https://ch …
3y ago
[Jelly], 9 bytes ŒHß¹Ḋ? …
3y ago
APL(Dyalog Unicode), 34 29 byt …
3y ago
APL(Dyalog Extended), 32 bytes …
3y ago
[Husk], 8 bytes ΣTm?I₀ε …
3y ago
1 comment thread