Interview Q&A / Aptitude

BeginnerQuick answer1 min readUpdated 3 Oct 2026

If COMPUTER is coded as DPNQVUFS, how is SYSTEM coded in the same language?

SHORT ANSWER

TZTUFN. Each letter of COMPUTER is shifted one place forward (C to D, O to P, and so on), so SYSTEM becomes T, Z, T, U, F, N.

Explain it simply

Most letter-coding questions apply one simple rule to every letter: shift forward or backward by a fixed amount, reverse the word, or replace each letter by its opposite in the alphabet. Write the original and the code one above the other, check the shift for two or three letters, and only then apply it.

Example

Question: COMPUTER = DPNQVUFS. Code SYSTEM.

  1. Compare: C to D (+1), O to P (+1), M to N (+1), P to Q (+1). The rule is +1 for every letter.
  2. Apply to SYSTEM: S to T, Y to Z, S to T, T to U, E to F, M to N.
  3. Code = TZTUFN.

A different common rule is the "opposite letter" code, where A pairs with Z, B with Y and so on (position p becomes 27 - p). Under that rule ROSE becomes ILHV: R (18) to I (9), O (15) to L (12), S (19) to H (8), E (5) to V (22).

js
const shift = (w, k) => [...w].map(c => String.fromCharCode(((c.charCodeAt(0) - 65 + k + 26) % 26) + 65)).join("");
const opposite = w => [...w].map(c => String.fromCharCode(155 - c.charCodeAt(0))).join("");
console.log(shift("SYSTEM", 1)); // Output: TZTUFN
console.log(opposite("ROSE")); // Output: ILHV

What to say in the interview

"Comparing letter by letter, every letter moves one step forward. Applying that to SYSTEM gives TZTUFN. I always check at least three letters before trusting the rule."

Common mistakes

  • Assuming the shift from the first letter only, when some codes use alternating shifts like +1, -1.
  • Forgetting to wrap from Z back to A.

#aptitude#reasoning#coding-decoding

Related questions

Practise more Aptitude questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Aptitude quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.