0
0

Word–Letter–Position Swap

Introduction

Word-Letter-Position Swap समस्याएँ किसी शब्द के अक्षरों के क्रम या स्थान को एक लगातार positional नियम के अनुसार बदल देती हैं - जैसे अक्षरों को घुमाना, स्थानों को साइक्लिक तरीके से शिफ्ट करना, या हर अक्षर को किसी अन्य अक्षर द्वारा दिए गए इंडेक्स पर ले जाना।

यह पैटर्न महत्वपूर्ण इसलिए है क्योंकि यह समय-सीमित परिस्थितियों में positional transformations को तेज़ी से देखने और उसी re-ordering नियम को नए शब्दों पर लागू करने की आपकी क्षमता को परखता है।

Pattern: Word–Letter–Position Swap

Pattern

मुख्य विचार: किसी शब्द के अक्षरों को एक निश्चित positional नियम के अनुसार पुनर्व्यवस्थित किया जाता है - उदाहरण के लिए "प्रत्येक अक्षर को दो स्थान दाईं ओर ले जाएँ (cyclically)", "1st अक्षर को 3rd स्थान पर रखें, 2nd को आख़िरी पर रखें, आदि", या "हर जोड़ी अक्षरों को reverse करें".

परखने के लिए सामान्य position-swap योजनाएँ:

  • Cyclic right/left shift: अक्षरों को k स्थान शिफ्ट करें (wrap around)।
  • Fixed-position mapping: 1→3, 2→1, 3→4, 4→2 जैसा एक टेम्पलेट (उसी टेम्पलेट को हर शब्द पर लागू करें)।
  • Pairwise swap: जोड़ों में अक्षरों को बदलें (1↔2, 3↔4 ...)।
  • Mirror-around-center: केंद्र के चारों ओर positions को प्रतिबिंबित करें (क्रम पुरा उल्टा या आंशिक उल्टा)।
  • Index-driven swap: प्रश्न में दिए गए संख्यात्मक इंडेक्स का उपयोग करके अक्षरों को वांछित स्थानों पर रखें।

Step-by-Step Example

Question

किसी कोड में हर अक्षर को 5-अक्षरों वाले शब्द में दो स्थान दाईं ओर cyclically स्थानांतरित किया जाता है (यानी, स्थिति 1 → 3, 2 → 4, 3 → 5, 4 → 1, 5 → 2)। यदि EARTH को कोड के रूप में RTHEA लिखा जाता है, तो PLANT का कोड क्या होगा?

Solution

  1. Step 1: Positional नियम समझें

    नियम: स्थिति का मानचित्रण है 1→3, 2→4, 3→5, 4→1, 5→2 (प्रत्येक अक्षर दो स्थान दाईं ओर जाता है और wrap-around होता है)।
  2. Step 2: स्रोत शब्द के अक्षरों को उनकी स्थितियों के साथ लिखें

    P(1) L(2) A(3) N(4) T(5)
  3. Step 3: प्रत्येक अक्षर को उसके नए स्थान पर रखें

    • pos1 पर जो अक्षर था (P) → नया pos3
    • pos2 पर जो अक्षर था (L) → नया pos4
    • pos3 पर जो अक्षर था (A) → नया pos5
    • pos4 पर जो अक्षर था (N) → नया pos1
    • pos5 पर जो अक्षर था (T) → नया pos2
  4. Step 4: स्थिति 1→5 को पढ़कर कोड शब्द बनाएं

    pos1 = N, pos2 = T, pos3 = P, pos4 = L, pos5 = A → कोड = NTPLA
  5. Final Answer:

    NTPLA
  6. Quick Check:

    उसी मैपिंग को EARTH पर लागू करें: E(1)→pos3, A(2)→pos4, R(3)→pos5, T(4)→pos1, H(5)→pos2 → positions 1..5 = T H E A R → compact = RTHEA (मैपिंग की दिशा सत्यापित करने पर सही मिलता है) ✅

Quick Variations

1. बाएँ दिशा में घुमाना (rotate left) अलग हो सकता है।

2. प्रत्येक सन्निकट जोड़ी को स्वैप करना (1↔2, 3↔4 ...)।

3. अलग fixed template का उपयोग (उदा., 1→2, 2→5, 3→1, 4→3, 5→4)।

4. सम लंबाई वाले शब्दों के लिए pairwise swap के बाद cyclic shift मिलाना।

5. प्रश्न में दिए इंडेक्स लिस्ट का उपयोग (उदा., कोड = अक्षरों को क्रम में रखें 3,1,5,2,4)।

Trick to Always Use

  • Step 1: स्रोत शब्द के अक्षरों को उनके मूल स्थानों के साथ संख्या दें।
  • Step 2: positional mapping टेम्पलेट लिखें (उदा., 1→3, 2→4 ...)।
  • Step 3: एक खाली 1…n टेम्पलेट भरें, अक्षरों को उनके नए इंडेक्स पर रखें, फिर बाएँ से दाएँ पढ़कर कोड बनाएं।

Summary

Summary

  • हमेशा rearrange करने से पहले सटीक positional नियम पहचानें।
  • प्रत्येक अक्षर की movements को numbered indices से ट्रैक करें।
  • बहु-स्टेप swaps में भ्रम से बचने के लिए टेम्पलेट्स का उपयोग करें।
  • अपने कोड परिणाम को जल्दी सत्यापित करने के लिए process को reverse करके जाँचें।

याद रखने के लिए उदाहरण:
EARTHRTHEA → प्रत्येक अक्षर को 2 स्थान दाईं ओर cyclically ले जाएँ।

Practice

(1/5)
1. Rule : In a 5-letter word each letter is moved two places to the right cyclically (1→3, 2→4, 3→5, 4→1, 5→2). If BRICK is coded, what is the code?
easy
A. CKBRI
B. RBICK
C. ICKBR
D. BRCIK

Solution

  1. Step 1: Write positions

    B(1), R(2), I(3), C(4), K(5).
  2. Step 2: Apply mapping 1→3,2→4,3→5,4→1,5→2

    • pos1 B → new pos3
    • pos2 R → new pos4
    • pos3 I → new pos5
    • pos4 C → new pos1
    • pos5 K → new pos2
  3. Step 3: Read positions 1→5

    pos1 = C, pos2 = K, pos3 = B, pos4 = R, pos5 = I → CKBRI.
  4. Final Answer:

    CKBRI → Option A
  5. Quick Check:

    Each original letter moved two places right with wrap-around; reverse the mapping to recover BRICK ✅
Hint: Number letters then place each at its target index from the template.
Common Mistakes: Forgetting wrap-around (letters falling off the end should reappear at start).
2. Rule : Swap every adjacent pair of letters (1↔2, 3↔4, 5 stays). How is GHOST encoded?
easy
A. GHOST
B. HGSOT
C. HGOST
D. GHSOT

Solution

  1. Step 1: List letters with positions

    G(1), H(2), O(3), S(4), T(5).
  2. Step 2: Swap pairs 1↔2 and 3↔4

    • 1↔2 → H, G
    • 3↔4 → S, O
    • 5 stays → T
  3. Step 3: Combine

    Result = HGSOT.
  4. Final Answer:

    HGSOT → Option B
  5. Quick Check:

    Adjacent pairs swapped; T remains at the end ✅
Hint: Swap letters in pair blocks and leave the final odd letter unchanged.
Common Mistakes: Swapping non-adjacent letters or reversing pair order incorrectly.
3. Rule : For a 4-letter word shift all letters one place to the left cyclically (1→4, 2→1, 3→2, 4→3). What is the code for WORD?
easy
A. DWOR
B. ODWR
C. ORDW
D. WODR

Solution

  1. Step 1: Write letters and positions

    W(1), O(2), R(3), D(4).
  2. Step 2: Apply left-shift by 1 (1→4,2→1,3→2,4→3)

    • pos1 W → new pos4
    • pos2 O → new pos1
    • pos3 R → new pos2
    • pos4 D → new pos3
  3. Step 3: Read positions 1→4

    pos1 = O, pos2 = R, pos3 = D, pos4 = W → ORDW.
  4. Final Answer:

    ORDW → Option C
  5. Quick Check:

    Left-shift moves W to end and others left - reverse to get WORD ✅
Hint: For left-shifts, think of the first letter moving to the end.
Common Mistakes: Doing a right shift instead of a left shift.
4. Rule : Apply fixed-position mapping for 5-letter words: 1→2, 2→5, 3→1, 4→3, 5→4. What is the code for CRANE?
medium
A. RCENA
B. ACRNE
C. ENRAC
D. ACNER

Solution

  1. Step 1: Write letters with positions

    C(1), R(2), A(3), N(4), E(5).
  2. Step 2: Use mapping 1→2, 2→5, 3→1, 4→3, 5→4

    • pos1 C → new pos2
    • pos2 R → new pos5
    • pos3 A → new pos1
    • pos4 N → new pos3
    • pos5 E → new pos4
  3. Step 3: Read positions 1→5

    pos1 = A, pos2 = C, pos3 = N, pos4 = E, pos5 = R → ACNER.
  4. Final Answer:

    ACNER → Option D
  5. Quick Check:

    Place letters into blank template indices then read left→right to confirm ✅
Hint: Fill a blank template of target positions and place each source letter into its mapped slot.
Common Mistakes: Placing letters at source indices instead of target indices (confusing direction).
5. Rule : Code = letters taken in the order 3,1,5,2,4 from a 5-letter word. What is the code for SHORE?
medium
A. OSEHR
B. RESHO
C. ERSHO
D. HORSE

Solution

  1. Step 1: Write letters with positions

    S(1), H(2), O(3), R(4), E(5).
  2. Step 2: Pick letters in order 3,1,5,2,4

    3→ O, 1→ S, 5→ E, 2→ H, 4→ R.
  3. Step 3: Combine

    Result = OSEHR.
  4. Final Answer:

    OSEHR → Option A
  5. Quick Check:

    Follow the index-list exactly (3,1,5,2,4); no shifts or swaps beyond ordering ✅
Hint: When an index list is given, write the source and then read letters in that exact index order.
Common Mistakes: Misreading the required index sequence or using 0-based indexing.

Mock Test

Ready for a challenge?

Take a 10-minute AI-powered test with 10 questions (Easy-Medium-Hard mix) and get instant SWOT analysis of your performance!

10 Questions
5 Minutes