Coding — Decoding Substitution Ciphers Fast
Coding — Decoding Substitution Ciphers Fast
Coding questions give you a key (a mapping between letters and numbers/symbols) and ask you to encode or decode a word. The CSE tests this to measure speed and attention to detail.
The 4 common coding patterns
Pattern 1: Letter-to-number (A=1, B=2, ... Z=26)
Encode "BAD": B=2, A=1, D=4 → 2-1-4
Memorize positions of common letters: A=1, E=5, I=9, O=15, U=21.
Pattern 2: Reverse alphabet (A=Z, B=Y, C=X, ... Z=A)
A letter at position k maps to letter at position 27-k. Encode "EXAM": E(5)→V(22), X(24)→C(3), A(1)→Z(26), M(13)→N(14) → VCZN
Pattern 3: Caesar cipher (shift by a fixed amount)
Shift of +3: A→D, B→E, C→F, ... X→A, Y→B, Z→C Decode "KHOOR" with shift -3: K→H, H→E, O→L, O→L, R→O → HELLO
Pattern 4: Symbol substitution
Given key: A=●, B=▲, C=■, D=◆ Encode "BAD": ▲●◆
Solving step-by-step
- Read the key carefully — what maps to what? Direct, reversed, shifted?
- Decode/encode one letter at a time — don't try to do it in your head all at once.
- Double-check the first and last letters (most common error spots).
- If you have a long word, write the letters separately first, then encode each.
Speed tips
- Alphabet position trick: memorize the position of every 5th letter — E=5, J=10, O=15, T=20, Y=25. Helps you quickly compute positions in your head.
- Reverse alphabet trick: for position k, the reverse is position (27 - k). So A(1) → Z(26), E(5) → V(22), M(13) → N(14).
- Caesar shift trick: for a shift of n, just add n to the position. Wrap around at 26 (if result > 26, subtract 26).
Common traps
- Wrong direction — the key shows encoding rules but the question asks for decoding. ALWAYS check which direction.
- Off-by-one errors — A is position 1, not 0. (Sometimes test makers use A=0 — read the key carefully.)
- Case mismatch — the answer might use lowercase while the key uses uppercase. Match the question's format.
Worked example
Key: A=Z, B=Y, C=X, D=W (reverse alphabet) Decode: ZYXW
- Z → reverse → A
- Y → reverse → B
- X → reverse → C
- W → reverse → D
Answer: ABCD
Strategy
Coding questions are usually 1-2 minutes each. Don't overthink — once you understand the key, the rest is mechanical. Speed comes from confidence in the alphabet positions.