Which of the following output permutations cannot be obtained from the input…

Which of the following output permutations cannot be obtained from the input sequence 1, 2, 3, 4, 5 using a deque, where insertion and deletion are allowed at both ends?

  1. A.

    3, 2, 1, 4, 5

  2. B.

    4, 5, 2, 1, 3

  3. C.

    4, 2, 1, 3, 5

  4. D.

    None of the above

Attempted by 353 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…