12th Class Computers Science Sample Paper Data Structure - Sample Paper-2

  • question_answer
    Consider a Queue with front=2, rear=4 and size=6 Diksha, Reena, Bhawna, Teena, ........................., What will be the queue after insertion of "Khushi" and "Pihu" and deletion of one element from the queue.

    A) Diksha, Reena, Teena, Khushi, Pihu

    B) Reena, Bhawna, Teena, Khushi, Pihu

    C) Diksha, Bhawna, Teena, Khushi, Pihu

    D) None of the above

    Correct Answer: A

    Solution :

    [a] Diksha, Reena, Teena, Khushi, Pihu
    We are given the value of rear as 4 so the elements "Khushi" and "Pihu" will be inserted at position 4 and 5. Now the value of front is given as 2 and element is being deleted from the front so "Bhawna" is removed from the queue.


You need to login to perform this action.
You will be redirected in 3 sec spinner