Candidates get a lot of questions of coding-decoding in the interview process or govt exams. Here I am going to share important tips to share these questions with solutions.
What is Coding-Decoding?
In simple words, Coding is the process of passing a message by Sender to Receiver, in such a way that no 3rd person can understand it.
Decoding is the reverse of Coding, its the process of understanding the hidden message sent by the sender.
Coding is the way of converting the simple plain message to something which is not understandable by the 3rd person.
Decoding is done to understand the encoded message.
Questions would be based on understanding the procedure of coding.
What should be the approach to solve coding-decoding questions?
Question Type 1 – Jumbled Letters
In this type, of question letters of the original word will be jumbled and you will be asked to find out the pattern in which the jumbling of letters is done. Let’s check the sample.
Ques. In some code “MOTIVATE” is written as “OMITAVET”. How can you write “INSPIRED” using the same code?
On checking closely you can clearly see that letters are jumbled in pairs. Check this figure below.
So, In order to write INSPIRED in the same code, we do the same thing. Check the figure below.
So clearly, the answer is “NIPSRIDE”
Question Type 2 – Letter Shifting
In these type of questions, each letter of the input word can be shifted forward or backward in the alphabetical order. Let’s get to example straight away.
Question In a certain code “CONFIDENCE” is written as “EQPHKFGPEG”. If we were to write “AMBITION” in the same code, how will we write?
In these questions, you have to detect the alphabetical position of the letters quickly. Let’s try to find out the relation between first letter of input “C” and first letter of output i.e. “E” and then the second letter “O” vs “Q” and so on.
Tip : You need to know the complete Alphabet in sequence.
Check the figure below.
So now we have cracked the code. Now we just need to find the decoded word for “AMBITION”. Check the figure below.
So clearly “CODKVKQP” is the correct answer.
Let’s get to the next type.
Question Type 3 – Letter Level Coding
In some coding-decoding questions, individual letters can be directly replaced for another character or symbol. There will be no general logic, you’ll be just asked to replace 1 character for the other.
I know you’ll understand better with an example.
Question. In given code BELIEVE is written is 83!13^3 and the word CLARITY is written as $!@*1() How can you write REALITY in the same code?
In this type of question, you can create a dictionary from the samples given. Just like the image below.
Now whenever you are asked about coding any word, just replace individual letters with the character in the dictionary above.
Find letters one by one for REALITY.
So correct answer is *3@!1()
Question Type 4 – Insufficient data
In some letter coding questions, it may be possible that all letters required in the answer are not available, there can be multiple possible answers. In these questions, you should check out the given options in the question. Eliminate the wrong options and choose the remaining option. Check the example below.
Question: If CRICKET is written as OTJOPYE and HOCKEY is written as BLOPYA. How can we write CRACKER?
We can clearly see that there is no common logic, it is the case of letter coding. So let’s try to create a dictionary with 2 examples given. Check the figure below.
Now we try to find a solution by substituting values from the above dictionary.
We didn’t find exact answer because there was no corresponding encoded letter for A in the question.
So we will have a look at the options given.
By observing clearly you can see that only option C can be correct.
To solve coding-decoding questions, you need to quickly analyze the question and determine which kind of coding is present in the question. It can be Jumbled letters, letter shifting, letter coding or questions which have insufficient data to find answer without checking the options.
The best way to nail these types of questions is that you need to practice all kinds of coding-decoding questions. Try to solve them as quickly as possible (to improve speed).
If you have any doubts, please leave a comment below.