Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • GfG 160: Daily DSA
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • IBPS RRB Exam 2023 - Free Course
  • SSC CGL
  • SBI PO
  • SBI Clerk
  • IBPS PO
  • IBPS Clerk
  • Current Affairs
  • Aptitude
  • General Knowledge
  • SSC CGL Pre.Yrs.Papers
  • SSC CGL Practice Papers
  • SBI PO PYQ
  • SBI Clerk PYQ
  • IBPS PO PYQ
  • IBPS Clerk PYQ
  • SBI PO Practice Paper
Open In App
Next Article:
Statement and Assumption in Logical Reasoning
Next article icon

Reasoning Tricks to Solve Coding -Decoding

Last Updated : 18 Nov, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Coding -Decoding is one of the most common sections included in all the types of competitive exams basically designed for hiring processes and higher education. Many candidates find Coding-Decoding questions challenging to solve, and as a result, they avoid attempting these scoring questions and lose some easy and quick marks.

Important Tricks to Solve Coding-Decoding

Remember the values of A-1, B-2, C-3, D-4, E-5,...............X-24, Y-25, Z-26.

So, finding the reverse value of any number simply, subtract that no. from 27 

 Ex:- the reverse of A i.e. 1 is  27-1 =26 so, our answer is Z whose value is 26. 

This concept will be very helpful in solving problems of Coding-Decoding.

Types of Coding-Decoding

There are the following types of Coding-Decoding

  • Letter based Coding 
  • Number based Coding
  • Symbolic based Coding 

Letter Coding -

Letter Coding is a type in which the letters are replaced with other letters.

Example of Letter Coding:

JUNE is coded as "HSLC", then what should be the code for JULY.


Explanation: To solve these kinds of problems, you have to remember that every alphabet has a specific number.
So, according to the question,
JUNE is coded as "HSLC"
J is coded as 10, U is coded as 21, N is coded as 14 and E is coded as 5
In the same way, "HSLC" is coded as
H is coded as 8, S is coded as 19, L is coded as 12 and C is coded as 3

If you observe both the given word, it is coded by decreasing 2 for each alphabet.
So, in the same way, to code "JULY", the same number should be decreased.
So you code "JULY" as:
J is coded as 10, U is coded as 21, L is coded as 12, Y is coded as 25
So, in the same way, it decreased each alphabet by 2
The final solution for JULY would be 8, 19, 10, 23

And you should code the word as "HSJW".

 
Number Coding - 

Let us Understand Number Coding with the help of an Example 

If “GEEKS” is coded as 35542, and GAME is coded as 3895, then what would be the code for  SKEEG?

So, here  The code of every letter is already specified in the question itself, so no need to use fixed codes of the letters.

Now, specify the number of each letter to solve the problem. If you observe the two words, some of the letters are repeated, so no need to write the repeated letters.

Now, code the letters.

G is coded as 3, E is coded as 5, K is coded as 4, S is coded as 2, A is coded as 8, and M is coded as 9

Using these codes, "SKEEG" is coded as 2,4,5,5,3. 


Symbol Coding - 

Let us Understand Symbol Coding with the help of this Example:

If

  • \star = 5
  • \triangle = 10
  • \square = 15
  • \diamond = 20

then what is the value of \star + \triangle + \diamond

Solution:

Substitute the values:

\star = 5, \ \triangle = 10, \ \diamond = 20

So,

\star + \triangle + \diamond = 5 + 10 + 20 = 35

This decodes the expression \star + \triangle + \diamond to 35.

 
Solved Questions on Coding-Decoding

Que 1. If   VGMACQ is coded as WHNCDR, then what will be the code for MOTHER ?

Explanation:

So, observing pattern we can see that , Each consonant like (V,M,C,Q) is increased by 1 i.e V to W , M to I  
and each Vowel is increased by 2 i.e A to C    

So, applying the same
MOTHER can be written as NQUIGS

Here consonant like(M,T,H,R) is incremented by 1 i.e M to N, T to U   and Vowels i.e O,E is incremented by 2 , i.e O to Q , etc.

Que 2. If A=1 and  BAD is written as 214 , then what will be the code for ACE ?

Explanation:

Here we can see that every alphabet is written as it's value in alphabets.

i.e A is the 1st alphabet.  so written as 1.
B is the 2nd, A is the 1st , D is 4th. So, written as 214.

So, ACE is written as 135. as A,C,E are the 1st , 2nd and 5th alphabet.

Que 3. If GEEKS is Written as  202222168 , then how would GOOD  be written ?

Explanation: 

Here, we can observe that every alphabet's reversed values is coded .

i.e G's alphabet value is 7 and reversed  value is 27-7 =20.
E's alphabet value is 5 and reversed  value is 27-5 =22.   and similarly for all.
So, GOOD will be written as  20121223
as     G's alphabet value is 7 and reversed  value is 27-7 =20.

O's alphabet value is 15 and reversed  value is 27-15 =12.
D's alphabet value is 4 and reversed  value is 27-4 =23.  

Practice Questions on Coding-Decoding

Question 1. If CAMERA is coded as DBNFSB, how is MOBILE coded?

Question 2. In a certain code, FLOWER is written as 6-12-15-23-5-18. How would GARDEN be written?

Question 3. If A=1, B=4, C=9, D=16, what does the code 49-1-25-36 represent?

Question 4. If EARTH is coded as FBSUI, how is VENUS coded?

Question 5. In a certain code, LOGIC is written as CIHOL. How would REASON be written


Next Article
Statement and Assumption in Logical Reasoning

S

sachinupreti190
Improve
Article Tags :
  • SSC/Banking
  • SSC Reasoning
  • Banking Reasoning

Similar Reads

  • Logical Reasoning Questions and Answers
    Logical Reasoning involves the ability to use and understand logical connections between facts or ideas. In verbal reasoning , questions are expressed in words or statements and require the reader to think critically about the language used in order to choose the correct answer from the given option
    5 min read
  • Number Series - Reasoning Questions and Answers
    Number Series is a widely asked topic in the Logical Reasoning section of competitive examinations held in India. In these types of questions, there will be a series of numbers given, along with a blank to be filled out. You are given the task of finding out the answer to the blank by figuring out t
    12 min read
  • Alphanumeric Series | Reasoning Questions and Answers
    Alphanumeric series is formed by combining both alphabets and numbers. Alphanumeric series sometimes include symbols such as @,&,#, etc. So we can say that the Alphanumeric series is the combination of alphabets, numbers and symbols. This is an important topic that needs to be covered for the Lo
    11 min read
  • Analogy Reasoning Questions and Answers
    Analogy is a topic of Logical Reasoning where the two things are compared and conclusions are drawn based on their similarities. Analogies questions are asked in various forms. These questions are also very important in the for the Verbal Ability section of the competitive examinations like SSC, Ban
    6 min read
  • Making Judgements: Reasoning Questions
    Judgement questions are part of the Logical Reasoning section in most of the competitive examinations. Judgement questions are solved by combining the knowledge given in the question and through common sense. Judgement questions must be prepared comprehensively as this is a scoring section in the re
    11 min read
  • Course of Action: Logical Reasoning Questions
    Course of Action is an important topic that needs to be covered for the Logical Reasoning section of the competitive examinations. It tests the analytical and logical ability of a candidate. The following article covers the concepts and Questions and Answers related to the topic. Practicing Statemen
    4 min read
  • Statement and Conclusion Logical Reasoning
    The Statement and Conclusion section is a part of logical and analytical reasoning, which is frequently asked in all competitive exams, especially in banking sector exams. Statement and conclusion questions is a set of statement followed by conclusions. The general idea to solve such questions is ju
    6 min read
  • Cause and Effect: Logical Reasoning Questions and Answers
    Cause and Effect Reasoning Section is one of the most tricky topics of Logical Reasoning section. The questions which come in this section are very easy in nature but they are designed in such a way that they are tricky. Candidates often get confused while solving these problems. It is asked in many
    10 min read
  • Statement and Argument-Analytical Reasoning
    Introduction :The argument is a very important part of analytical reasoning expressing different opinions for or against something. In competitive examinations, different types of questions are asked from this section in the form of inferences, assumptions, course of action, syllogism, etc. This is
    4 min read
  • HCL Placement Paper | Verbal Reasoning Set - 2
    This is an HCL model paper for Verbal Aptitude. This placement paper will cover aptitude that is asked in HCL placements and also strictly follows the pattern of questions asked in HCL papers. It is recommended to solve each one of the following questions to increase your chances of clearing the HCL
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

'); // $('.spinner-loading-overlay').show(); let script = document.createElement('script'); script.src = 'https://assets.geeksforgeeks.org/v2/editor-prod/static/js/bundle.min.js'; script.defer = true document.head.appendChild(script); script.onload = function() { suggestionModalEditor() //to add editor in suggestion modal if(loginData && loginData.premiumConsent){ personalNoteEditor() //to load editor in personal note } } script.onerror = function() { if($('.editorError').length){ $('.editorError').remove(); } var messageDiv = $('
').text('Editor not loaded due to some issues'); $('#suggestion-section-textarea').append(messageDiv); $('.suggest-bottom-btn').hide(); $('.suggestion-section').hide(); editorLoaded = false; } }); //suggestion modal editor function suggestionModalEditor(){ // editor params const params = { data: undefined, plugins: ["BOLD", "ITALIC", "UNDERLINE", "PREBLOCK"], } // loading editor try { suggestEditorInstance = new GFGEditorWrapper("suggestion-section-textarea", params, { appNode: true }) suggestEditorInstance._createEditor("") $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = true; } catch (error) { $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = false; } } //personal note editor function personalNoteEditor(){ // editor params const params = { data: undefined, plugins: ["UNDO", "REDO", "BOLD", "ITALIC", "NUMBERED_LIST", "BULLET_LIST", "TEXTALIGNMENTDROPDOWN"], placeholderText: "Description to be......", } // loading editor try { let notesEditorInstance = new GFGEditorWrapper("pn-editor", params, { appNode: true }) notesEditorInstance._createEditor(loginData&&loginData.user_personal_note?loginData.user_personal_note:"") $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = true; } catch (error) { $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = false; } } var lockedCasesHtml = `You can suggest the changes for now and it will be under 'My Suggestions' Tab on Write.

You will be notified via email once the article is available for improvement. Thank you for your valuable feedback!`; var badgesRequiredHtml = `It seems that you do not meet the eligibility criteria to create improvements for this article, as only users who have earned specific badges are permitted to do so.

However, you can still create improvements through the Pick for Improvement section.`; jQuery('.improve-header-sec-child').on('click', function(){ jQuery('.improve-modal--overlay').hide(); $('.improve-modal--suggestion').hide(); jQuery('#suggestion-modal-alert').hide(); }); $('.suggest-change_wrapper, .locked-status--impove-modal .improve-bottom-btn').on('click',function(){ // when suggest changes option is clicked $('.ContentEditable__root').text(""); $('.suggest-bottom-btn').html("Suggest changes"); $('.thank-you-message').css("display","none"); $('.improve-modal--improvement').hide(); $('.improve-modal--suggestion').show(); $('#suggestion-section-textarea').show(); jQuery('#suggestion-modal-alert').hide(); if(suggestEditorInstance !== null){ suggestEditorInstance.setEditorValue(""); } $('.suggestion-section').css('display', 'block'); jQuery('.suggest-bottom-btn').css("display","block"); }); $('.create-improvement_wrapper').on('click',function(){ // when create improvement option clicked then improvement reason will be shown if(loginData && loginData.isLoggedIn) { $('body').append('
'); $('.spinner-loading-overlay').show(); jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.unlocked-status--improve-modal-content').css("display","none"); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { showErrorMessage(e.responseJSON,e.status) }, }); } else { if(loginData && !loginData.isLoggedIn) { $('.improve-modal--overlay').hide(); if ($('.header-main__wrapper').find('.header-main__signup.login-modal-btn').length) { $('.header-main__wrapper').find('.header-main__signup.login-modal-btn').click(); } return; } } }); $('.left-arrow-icon_wrapper').on('click',function(){ if($('.improve-modal--suggestion').is(":visible")) $('.improve-modal--suggestion').hide(); else{ } $('.improve-modal--improvement').show(); }); const showErrorMessage = (result,statusCode) => { if(!result) return; $('.spinner-loading-overlay:eq(0)').remove(); if(statusCode == 403) { $('.improve-modal--improve-content.error-message').html(result.message); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); return; } } function suggestionCall() { var editorValue = suggestEditorInstance.getValue(); var suggest_val = $(".ContentEditable__root").find("[data-lexical-text='true']").map(function() { return $(this).text().trim(); }).get().join(' '); suggest_val = suggest_val.replace(/\s+/g, ' ').trim(); var array_String= suggest_val.split(" ") //array of words var gCaptchaToken = $("#g-recaptcha-response-suggestion-form").val(); var error_msg = false; if(suggest_val != "" && array_String.length >=4){ if(editorValue.length { jQuery('.ContentEditable__root').focus(); jQuery('#suggestion-modal-alert').hide(); }, 3000); } } document.querySelector('.suggest-bottom-btn').addEventListener('click', function(){ jQuery('body').append('
'); jQuery('.spinner-loading-overlay').show(); if(loginData && loginData.isLoggedIn) { suggestionCall(); return; } // script for grecaptcha loaded in loginmodal.html and call function to set the token setGoogleRecaptcha(); }); $('.improvement-bottom-btn.create-improvement-btn').click(function() { //create improvement button is clicked $('body').append('
'); $('.spinner-loading-overlay').show(); // send this option via create-improvement-post api jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { showErrorMessage(e.responseJSON,e.status); }, }); });
"For an ad-free experience and exclusive features, subscribe to our Premium Plan!"
Continue without supporting
`; $('body').append(adBlockerModal); $('body').addClass('body-for-ad-blocker'); const modal = document.getElementById("adBlockerModal"); modal.style.display = "block"; } function handleAdBlockerClick(type){ if(type == 'disabled'){ window.location.reload(); } else if(type == 'info'){ document.getElementById("ad-blocker-div").style.display = "none"; document.getElementById("ad-blocker-info-div").style.display = "flex"; handleAdBlockerIconClick(0); } } var lastSelected= null; //Mapping of name and video URL with the index. const adBlockerVideoMap = [ ['Ad Block Plus','https://media.geeksforgeeks.org/auth-dashboard-uploads/abp-blocker-min.mp4'], ['Ad Block','https://media.geeksforgeeks.org/auth-dashboard-uploads/Ad-block-min.mp4'], ['uBlock Origin','https://media.geeksforgeeks.org/auth-dashboard-uploads/ub-blocke-min.mp4'], ['uBlock','https://media.geeksforgeeks.org/auth-dashboard-uploads/U-blocker-min.mp4'], ] function handleAdBlockerIconClick(currSelected){ const videocontainer = document.getElementById('ad-blocker-info-div-gif'); const videosource = document.getElementById('ad-blocker-info-div-gif-src'); if(lastSelected != null){ document.getElementById("ad-blocker-info-div-icons-"+lastSelected).style.backgroundColor = "white"; document.getElementById("ad-blocker-info-div-icons-"+lastSelected).style.borderColor = "#D6D6D6"; } document.getElementById("ad-blocker-info-div-icons-"+currSelected).style.backgroundColor = "#D9D9D9"; document.getElementById("ad-blocker-info-div-icons-"+currSelected).style.borderColor = "#848484"; document.getElementById('ad-blocker-info-div-name-span').innerHTML = adBlockerVideoMap[currSelected][0] videocontainer.pause(); videosource.setAttribute('src', adBlockerVideoMap[currSelected][1]); videocontainer.load(); videocontainer.play(); lastSelected = currSelected; }

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences