Home / CSE MCQs / Data Structure MCQs :: Discussion

Discussion :: Data Structure MCQs

  1. Which of the following can be used to delete an element from the rear end of the queue?
  2. A.

    public Object deleteRear() throws emptyDEQException


    {


    B.

    public Object deleteRear() throws emptyDEQException


    {


    C.

    public Object deleteRear() throws emptyDEQException


    {


    D.
    None of the mentioned

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    Traverse till the end of the list with a pointer 'temp' and another 'cur' which is trailing behind temp, make 'cur' point to trail, this removes all reference for 'temp'.


Be The First To Comment