Placement AptitudeVery hardCognizant GenC Next · TCS NQT

A machine arranges numbers. In each step it moves the largest of the not-yet-placed numbers to the leftmost unplaced position and the smallest of them to the rightmost unplaced position, leaving the others in their order. Input: 12 30 4 18 25 7 Which number is third from the left after Step 2?

  1. A. 18
  2. B. 12
  3. C. 25
  4. D. 7

Correct answer: B. 12

Step 1: 30 12 18 25 7 4 (30 to the front, 4 to the end). Step 2 works on 12 18 25 7: 25 goes to position 2 and 7 to position 5, giving 30 25 12 18 7 4. Third from the left is 12.

More Logical Reasoning for Placements questions

Exams that ask this topic