Any2Quiz
ICSE / 12 / Computer Science / Data Structures – stack, queue, dequeue, linked list, binary trees, infix

postfix conversions Quiz - ICSE Class 12 Computer Science

Free practice quiz: postfix conversions (ICSE Class 12 Computer Science). 48 multiple-choice questions with answers and explanations. Play online, no sign-up needed.

Play all 48 questions free

Sample questions

  1. In a singly linked list, if the head pointer is NULL, what does it signify?

    1. The list is full
    2. The list is empty
    3. The list has only one node
    4. The list is corrupted
    Show answer

    Answer: B. The list is empty

    In a singly linked list, the head pointer points to the first node. If the head pointer is NULL, it means there are no nodes in the list, hence the list is empty.

  2. Which operation on a stack would result in an 'underflow' error?

    1. Pushing an element onto an empty stack
    2. Popping an element from a non-empty stack
    3. Popping an element from an empty stack
    4. Peeking at an element in a non-empty stack
    Show answer

    Answer: C. Popping an element from an empty stack

    Stack underflow occurs when an attempt is made to pop or peek at an element from an empty stack. There are no elements to retrieve, hence the error.

  3. Which type of binary tree traversal visits nodes in ascending order of their keys?

    1. Pre-order
    2. In-order
    3. Post-order
    4. Level-order
    Show answer

    Answer: B. In-order

    An in-order traversal of a Binary Search Tree (BST) visits the nodes in ascending order of their keys. The process is: traverse left subtree, visit root, traverse right subtree.

  4. Which property does a balanced binary search tree aim to maintain?

    1. Minimum height for the number of nodes
    2. Maximum height for the number of nodes
    3. Equal number of nodes in left and right subtrees
    4. Constant height regardless of the number of nodes
    Show answer

    Answer: A. Minimum height for the number of nodes

    A balanced binary search tree (like AVL trees or Red-Black trees) ensures that the height of the tree remains logarithmic with respect to the number of nodes (O(log n)). This is achieved by maintaining a relatively small height, which leads to efficient search, insertion, and deletion operations with an average and worst-case time complexity of O(log n).

  5. What is the time complexity for deleting an element from the front of a queue implemented using a singly linked list?

    1. O(1)
    2. O(log n)
    3. O(n)
    4. O(n^2)
    Show answer

    Answer: A. O(1)

    Deleting an element from the front of a queue implemented with a singly linked list is an O(1) operation. This involves simply updating the head pointer to point to the next node in the list.

Take the full quiz

Browse all Data Structures – stack, queue, dequeue, linked list, binary trees, infix quizzes