1. Home
  2. Interview Questions
  3. Aptitude
  4. How do you decode sentence-based codes where several words s…

Try answering first

In a real interview nobody shows you the answer. Think it through (or type it), then reveal the answers and rate yourself.

1 Answer

0 0
InterviewQuestions Team ✔ Expert answer ✔ Best answer ·

Short answer: Compare sentences two at a time. A word that appears in both sentences must take the code that appears in both coded versions. Fix these common pairs step by step, then use elimination for the remaining words. If a word's code could still be one of two options, the answer is 'cannot be determined'.

Detailed explanation

In this type of question, each English word maps to exactly one code word. However, the codes are usually not listed in the same order as the words. Position therefore tells you nothing, and the only reliable tool is set intersection.

The core logic: If a word appears in sentence 1 and sentence 2, its code must appear in both coded sentences. If exactly one word and exactly one code are common to two sentences, they are matched.

Systematic method:

  1. Write each sentence with its code directly beneath it.
  2. Take every pair of sentences and find the common words and the common codes.
  3. When a pair has a single common word and a single common code, record that match.
  4. Strike out matched words and codes everywhere. This often turns new pairs into single-common cases.
  5. When a sentence has only one unmatched word and one unmatched code left, those two belong together.
  6. For any word still left with two or more possible codes, the answer is 'cannot be determined'.

Why the question is hard: Examiners deliberately include words that appear in only one sentence. Their codes can be narrowed down but not always fixed. Recognising when information is insufficient is what this question actually tests.

Example

1. tam sik ro   means  good bright day
2. ro pul ken   means  day is long
3. pul sik ved  means  long good night

Pairwise comparison:

  • Sentences 1 and 2: the common word is day and the common code is ro, so day = ro.
  • Sentences 2 and 3: the common word is long and the common code is pul, so long = pul.
  • Sentences 1 and 3: the common word is good and the common code is sik, so good = sik.

Elimination:

  • Sentence 1: removing good and day leaves bright = tam.
  • Sentence 2: removing day and long leaves is = ken.
  • Sentence 3: removing long and good leaves night = ved.

All six words are now decoded. If asked for the code for 'bright', the answer is tam.

The cannot-be-determined trap: Suppose only sentences 1 and 2 were given. You could still fix day = ro. However, 'good' could be either tam or sik, because nothing separates it from 'bright'. The correct answer would then be 'cannot be determined'. Choosing tam or sik would be a guess, and a correct guess still means faulty reasoning.

Common mistakes

  • Assuming the codes follow the word order. This is usually false, and the examiner expects you to ignore position.
  • Comparing only consecutive sentences. Sentences 1 and 3 often hold the key match.
  • Choosing one of two possible codes instead of marking 'cannot be determined'.
  • Not striking out matched words, which makes later comparisons confusing and error-prone.

Follow-up questions

  • Using the same code, what would 'good night' most likely be coded as, and does code order matter in your answer?
  • If a word appears in only one sentence and that sentence has two unmatched codes, how do you decide the answer?
  • How would you approach a version where letters inside the code word also carry meaning, such as a common prefix for related words?

Interview tip: Say your reasoning aloud as 'common word, common code' for each pair. Interviewers care more about clean elimination logic than about speed.

Reviewed by the Interview Questions editorial team · Last updated

How well did you know this?

Rate yourself to track progress, build your streak and get “didn't know” questions in your revision list.

Your Answer

More hard Aptitude questions

All hard questions →

Related Questions

‹
Q4 of 9 · Aptitude
Next ›

Interview Questions

Free interview questions and answers, MCQ practice, online tests, mock interviews and group discussions — everything you need to crack your next interview.
📍 Dasardot LLC
1309 Coffeen Avenue STE 1200
Sheridan, Wyoming 82801
USA