Home / CSE MCQs / Data Structure MCQs :: Data Structure Abstract Data Types

CSE MCQs :: Data Structure MCQs

  1. Given pointer to a node X in a singly linked list. Only one pointer is given, pointer to head node is not given, can we delete the node X from given linked list?
  2. A.
    Possible if X is not last node
    B.
    Possible if size of linked list is even
    C.
    Possible if size of linked list is odd
    D.
    Possible if X is not first node

  3. What is the space complexity for deleting a linked list?
  4. A.
    O(1)
    B.
    O(n)
    C.
    Either O(1) or O(n)
    D.
    O(logn)

  5. Which of the following applications may use a stack?
  6. A.
    A parentheses balancing program.
    B.
    Tracking of local variables at run time.
    C.
    Compiler Syntax Analyzer.
    D.
    All of the mentioned

  7. Which data structure is needed to convert infix notation to postfix notation?
  8. A.
    Branch
    B.
    Tree
    C.
    Queue
    D.
    Stack

  9. Which of the following is not an inherent application of stack?
  10. A.
    Reversing a string
    B.
    Evaluation of postfix expression
    C.
    Implementation of recursion
    D.
    Job scheduling

  11. Which of the following array position will be occupied by a new element being pushed for a stack of size N elements(capacity of stack > N).
  12. A.
    S[N-1].
    B.
    S[N]
    C.
    S[1].
    D.
    S[0].

  13. What does 'stack overflow' refer to?
  14. A.
    accessing item from an undefined stack
    B.
    adding items to a full stack
    C.
    removing items from an empty stack
    D.
    index out of bounds exception

  15. Making the pop operation costly, select the code snippet which implements the same.
  16. A.

    public int pop()


    {


    B.

    public int pop()


    {


    C.

    public int pop()


    {


    D.
    None of the mentioned