On This Page

This set of Data Structure DS Multiple Choice Questions & Answers (MCQs) focuses on Data Structure Set 4

Q1 | A circular linked list can be used for
Q2 | In doubly linked lists
Q3 | The disadvantage in using a circular linked list is …………………….
Q4 | A linear list in which each node has pointers to point to the predecessor and successors nodes is called as
Q5 | The situation when in a linked list START=NULL is
Q6 | In doubly linked lists, traversal can be performed?
Q7 | What differentiates a circular linked list from a normal linked list?
Q8 | How do you count the number of elements in the circular linked list?
Q9 | public int function(){if(head == null)return Integer.MIN_VALUE;int var;Node temp = head;while(temp.getNext() != head)temp = temp.getNext();if(temp == head){var = head.getItem();head = null;return var;}temp.setNext(head.getNext());var = head.getItem();head = head.getNext();return var;} What is the functionality of the following code? Choose the most appropriate answer.
Q10 | What is the functionality of the following code? Choose the most appropriate answer. public int function(){if(head == null)return Integer.MIN_VALUE;int var;Node temp = head;Node cur;while(temp.getNext() != head){cur = temp;temp = temp.getNext();}if(temp == head){var = head.getItem();head = null;return var;}var = temp.getItem();cur.setNext(head);return var;}
Q11 | How do you insert a node at the beginning of the list?
Q12 | What is a dequeue?
Q13 | Suppose a circular queue of capacity (n – 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are
Q14 | Suppose implementation supports an instruction REVERSE, which reverses the order of elements on the stack, in addition to the PUSH and POP instructions. Which one of the following statements is TRUE with respect to this modified stack?
Q15 | Suppose you are given an implementation of a queue of integers. The operations that can be performed on the queue are:i. isEmpty (Q) — returns true if the queue is empty, false otherwise.ii. delete (Q) — deletes the element at the front of the queue and returns its value.iii. insert (Q, i) — inserts the integer i at the rear of the queue.Consider the following function:void f (queue Q) {int i ;if (!isEmpty(Q)) {i = delete(Q);f(Q);insert(Q, i);}}What operation is performed by the above function f ?
Q16 | Consider the following statements:i. First-in-first out types of computations are efficiently supported by STACKS.ii. Implementing LISTS on linked lists is more efficient than implementing LISTS onan array for almost all the basic LIST operations.iii. Implementing QUEUES on a circular array is more efficient than implementing QUEUESon a linear array with two indices.iv. Last-in-first-out type of computations are efficiently supported by QUEUES.Which of the following is correct?
Q17 | Which of the following option is not correct?
Q18 | Consider a standard Circular Queue 'q' implementation (which has the same condition for Queue Full and Queue Empty) whose size is 11 and the elements of the queue are q[0], q[1], q[2].....,q[10]. The front and rear pointers are initialized to point at q[2] . In which position will the ninth element be added?
Q19 | Overflow condition in linked list may occur when attempting to .............
Q20 | Which of the following is not a type of Linked List ?
Q21 | Linked list is generally considered as an example of _________ type of memory allocation.
Q22 | Each Node contain minimum two fields one field called data field to store data. Another field is of type _________.
Q23 | If in a linked list address of first node is 1020 then what will be the address of node at 5th position ?
Q24 | In Circular Linked List insertion of a node involves the modification of ____ links.
Q25 | If a list contains no elements it is said to be