Alternate Arrangement Medium

Alternate Arrangement problems present mixed input containing both words and numbers. Words are sorted alphabetically, numbers are sorted numerically, and then they are interleaved in an alternating pattern (e.g., word, number, word, number). These problems test your ability to handle mixed data types and apply interleaving rules.

10Worksheets
200+Practice Questions
MediumDifficulty
2-3 hoursHours to Master

Introduction to Alternate Arrangement Medium

Alternate Arrangement problems present mixed input containing both words and numbers. Words are sorted alphabetically, numbers are sorted numerically, and then they are interleaved in an alternating pattern (e.g., word, number, word, number). These problems test your ability to handle mixed data types and apply interleaving rules.

Prerequisites

Alphabetical sorting of words Numerical sorting of numbers Understanding of interleaving patterns Mixed data type handling
Why This Matters: Alternate Arrangement problems appear in 1-2 questions in SSC CGL and Banking PO exams. They test mixed data processing skills.

How to Solve Alternate Arrangement Medium Problems

1

Step 1: Separate the input into words and numbers

2

Step 2: Sort words alphabetically

3

Step 3: Sort numbers in ascending order

4

Step 4: Interleave following the pattern (e.g., word first, then number, repeat)

5

Step 5: If one list is longer, remaining items are appended at the end

6

Step 6: The final output is the interleaved sequence

7

Step 7: Verify the pattern for all positions

Pro Strategy: Always separate words and numbers first. Sort each group independently. Then interleave according to the specified pattern (which group starts first). For lists of different lengths, the extra items are placed at the end in sorted order.

Example Problem

Example: Input: 'sun 45 moon 23 star 78' Step 1: Separate words and numbers Step 2: Words sorted: 'moon', 'star', 'sun' Step 3: Numbers sorted: '23', '45', '78' Step 4: Alternate (word, number): 'moon 23 star 45 sun 78' Answer: moon 23 star 45 sun 78

Pro Tips & Tricks

  • Identify whether words or numbers come first in the pattern
  • Common patterns: word-number-word-number or number-word-number-word
  • Sort words alphabetically (A to Z)
  • Sort numbers in ascending order (smallest to largest)
  • If lists are different lengths, the longer list's remaining items go at the end
  • Numbers may be treated as strings for interleaving but sorted numerically

Shortcut Methods to Solve Faster

Final output = interleave(sorted_words, sorted_numbers, pattern)
For word-number pattern: result[i*2] = sorted_words[i], result[i*2+1] = sorted_numbers[i]
For number-word pattern: result[i*2] = sorted_numbers[i], result[i*2+1] = sorted_words[i]
If len(words) > len(numbers), extra words go at the end

Common Mistakes to Avoid

Forgetting to sort words alphabetically
Forgetting to sort numbers numerically
Mixing up the interleaving pattern (which comes first)
Not handling lists of different lengths correctly
Treating numbers as strings when sorting (should sort numerically)

Exam Importance

Alternate Arrangement Medium is an important topic for various competitive exams. Here's how frequently it appears:

SSC CGL
1-2 questions
BANKING PO
1-2 questions
RAILWAYS RRB
1-2 questions
INSURANCE
1-2 questions

Ready to Master Alternate Arrangement Medium?

Start with Worksheet 1 and work your way up to expert level! Each worksheet includes:

20 practice questions
Detailed solutions
Step-by-step explanations
Start Practicing Now