Question:

Given an input line of numbers and words, a machine rearranges them following a particular rule in each step. Here is an illustration of an input and rearrangement sequence (Step 1 to Step 5): Input: 61 wb ob 48 45 29 34 sb pb lb
Step 1: lb wb ob 48 45 29 34 sb pb 61
Step 2: lb ob wb 45 29 34 sb pb 61 48
Step 3: lb ob pb wb 29 34 sb 61 48 45
Step 4: lb ob pb sb wb 61 48 45 34 29
Step 5: lb ob pb sb wb 61 48 45 34 29
Step 5 is the last step of the above arrangement.
Based on the rules followed in the above steps, answer the following question: Input: cb kb eb 58 49 23 38 jb nb gb 69 82
Which of the following represents the position of 58 in the fourth step? (Step-5 is the last step of the arrangement.)

Show Hint

To solve machine arrangement problems, identify patterns for word and number sorting, and track the element's position across steps.
Updated On: Jan 24, 2025
  • Second from the left
  • Fourth from the right
  • Third from the right
  • Seventh from the left
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

The arrangement rule involves two processes:
1. Words are arranged in alphabetical order from left to right in each step.
2. Numbers are arranged in descending order from right to left in each step.
For the input: cb kb eb 58 49 23 38 jb nb gb 69 82,
Step-by-step arrangement proceeds as follows:
Step 1: eb cb kb 49 23 38 jb nb gb 69 82 58
Step 2: eb cb gb kb 23 38 jb nb 82 69 58 49
Step 3: eb cb gb jb kb 38 nb 82 69 58 49 23
Step 4: eb cb gb jb kb nb 82 69 58 49 38 23
In Step 4, 58 is the third from the right.
Was this answer helpful?
0
0

Questions Asked in GATE XH- C4 exam

View More Questions