Small-to-capital letter coding is given as pairs: s→R, u→A, m→P, l→M, a→S, d→O. From the code letters "M A P S R O", decode the original small letters (in order).

Difficulty: Easy

Correct Answer: lumasd

Explanation:


Introduction / Context:
The prompt provides explicit one-to-one mappings from certain lowercase letters to uppercase code letters. We must invert the mapping to decode a sequence of capitals back to lowercase in the given order.



Given Data / Assumptions:

  • Pairs: s→R, u→A, m→P, l→M, a→S, d→O.
  • Decode sequence: M A P S R O (capitals), left to right.


Concept / Approach:
Build the reverse dictionary: M→l, A→u, P→m, S→a, R→s, O→d. Then decode each letter in order, concatenating the results into a single lowercase string.



Step-by-Step Solution:
M→lA→uP→mS→aR→sO→dConcatenate: l u m a s d → "lumasd".



Verification / Alternative check:
Re-encode "lumasd" using the original pairs to get back "MAPSRO".



Why Other Options Are Wrong:

  • lumdas, lumsda, lumsad: These contain letter order swaps inconsistent with decoding left-to-right.


Common Pitfalls:
Confusing the mapping direction or treating spaces as separators that should be preserved in the answer string.



Final Answer:
lumasd

More Questions from Coding Decoding

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion