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

  • question_answer
    A queue contains elements "S1"."S2","S3", and "S4". You want to delete elements one by one, then the order in which they will be removed is:

    A) S4S3S2S1      

    B) S1S2S3S4

    C) S2S3S1S4      

    D) None of the above

    Correct Answer: B

    Solution :

    [b] If a queue contains elements "S1”,"S2","S3", and "S4" and you want to delete one element at a time, then the order in which they will be removed is "S1S2S3S4", because Queue follows FIFO principle and according to this, element is removed on the basis of First in.


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