1. | Which if the following is/are the levels of implementation of data structure |
A. | abstract level |
B. | application level |
C. | implementation level |
D. | all of the above |
Answer» D. all of the above |
2. | A binary search tree whose left subtree and right subtree differ in hight by at most 1 unit is called …… |
A. | avl tree |
B. | red-black tree |
C. | lemma tree |
D. | none of the above |
Answer» A. avl tree |
3. | Stack is also called as |
A. | last in first out |
B. | first in last out |
C. | last in last out |
D. | first in first out |
Answer» A. last in first out |
4. | …………… is not the component of data structure. |
A. | operations |
B. | storage structures |
C. | algorithms |
D. | none of above |
Answer» D. none of above |
5. | Which of the following is not the part of ADT description? |
A. | data |
B. | operations |
C. | both of the above |
D. | none of the above |
Answer» D. none of the above |
6. | ……………. Is a pile in which items are added at one end and removed from the other. |
A. | stack |
B. | queue |
C. | list |
D. | none of the above |
Answer» B. queue |
7. | ………… is very useful in situation when data have to stored and then retrieved in reverse order. |
A. | stack |
B. | queue |
C. | list |
D. | link list |
Answer» A. stack |
8. | Which data structure allows deleting data elements from and inserting at rear? |
A. | stacks |
B. | queues |
C. | dequeues |
D. | binary search tree |
Answer» B. queues |
9. | Which of the following data structure can’t store the non-homogeneous data elements? |
A. | arrays |
B. | records |
C. | pointers |
D. | stacks |
Answer» A. arrays |
10. | A ……. is a data structure that organizes data similar to a line in the supermarket, where the first one in line is the first one out. |
A. | queue linked list |
B. | stacks linked list |
C. | both of them |
D. | neither of them |
Answer» A. queue linked list |
11. | Which of the following is non-liner data structure? |
A. | stacks |
B. | list |
C. | strings |
D. | trees |
Answer» D. trees |
12. | Herder node is used as sentinel in ….. |
A. | graphs |
B. | stacks |
C. | binary tree |
D. | queues |
Answer» C. binary tree |
13. | Which data structure is used in breadth first search of a graph to hold nodes? |
A. | stack |
B. | queue |
C. | tree |
D. | array |
Answer» B. queue |
14. | Identify the data structure which allows deletions at both ends of the list but insertion at only one end. |
A. | input restricted dequeue |
B. | output restricted qequeue |
C. | priority queues |
D. | stack |
Answer» A. input restricted dequeue |
15. | Which of the following data structure is non linear type? |
A. | strings |
B. | lists |
C. | stacks |
D. | graph |
Answer» D. graph |
16. | Which of the following data structure is linear type? |
A. | graph |
B. | trees |
C. | binary tree |
D. | stack |
Answer» D. stack |
17. | To represent hierarchical relationship between elements, Which data structure is suitable? |
A. | dequeue |
B. | priority |
C. | tree |
D. | graph |
Answer» C. tree |
18. | A directed graph is ………………. if there is a path from each vertex to every other vertex in the digraph. |
A. | weakly connected |
B. | strongly connected |
C. | tightly connected |
D. | linearly connected |
Answer» B. strongly connected |
19. | In the …………….. traversal we process all of a vertex’s descendants before we move to an adjacent vertex. |
A. | depth first |
B. | breadth first |
C. | with first |
D. | depth limited |
Answer» A. depth first |
20. | The number of comparisons done by sequential search is ……………… |
A. | (n/2)+1 |
B. | (n+1)/2 |
C. | (n-1)/2 |
D. | (n+2)/2 |
Answer» B. (n+1)/2 |
21. | In ……………, search start at the beginning of the list and check every element in the list. |
A. | linear search |
B. | binary search |
C. | hash search |
D. | binary tree search |
Answer» A. linear search |
22. | Which of the following is not the internal sort? |
A. | insertion sort |
B. | bubble sort |
C. | merge sort |
D. | heap sort |
Answer» C. merge sort |
23. | A graph is said to be ……………… if the vertices can be split into two sets V1 and V2 such there are no edges between two vertices of V1 or two vertices of V2. |
A. | partite |
B. | bipartite |
C. | rooted |
D. | bisects |
Answer» B. bipartite |
24. | In a queue, the initial values of front pointer f rare pointer r should be …….. and ……….. respectively. |
A. | 0 and 1 |
B. | 0 and -1 |
C. | -1 and 0 |
D. | 1 and 0 |
Answer» B. 0 and -1 |
26. | The advantage of …………….. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists. |
A. | lists |
B. | linked lists |
C. | trees |
D. | queues |
Answer» B. linked lists |
27. | What will be the value of top, if there is a size of stack STACK_SIZE is 5 |
A. | 5 |
B. | 6 |
C. | 4 |
D. | none |
Answer» C. 4 |
28. | ………… is not the operation that can be performed on queue. |
A. | insertion |
B. | deletion |
C. | retrieval |
D. | traversal |
Answer» D. traversal |
29. | There is an extra element at the head of the list called a ………. |
A. | antinel |
B. | sentinel |
C. | list header |
D. | list head |
Answer» B. sentinel |
30. | A graph is a collection of nodes, called ………. And line segments called arcs or ……….. that connect pair of nodes. |
A. | vertices, edges |
B. | edges, vertices |
C. | vertices, paths |
D. | graph node, edges |
Answer» A. vertices, edges |
31. | A ……….. is a graph that has weights of costs associated with its edges. |
A. | network |
B. | weighted graph |
C. | both a and b |
D. | none a and b |
Answer» C. both a and b |
32. | In general, the binary search method needs no more than ……………. comparisons. |
A. | [log2n]-1 |
B. | [logn]+1 |
C. | [log2n] |
D. | [log2n]+1 |
Answer» D. [log2n]+1 |
33. | Which of the following is not the type of queue? |
A. | ordinary queue |
B. | single ended queue |
C. | circular queue |
D. | priority queue |
Answer» B. single ended queue |
34. | The property of binary tree is |
A. | the first subset is called left subtree |
B. | the second subtree is called right subtree |
C. | the root cannot contain null |
D. | the right subtree can be empty |
Answer» D. the right subtree can be empty |
35. | Any node is the path from the root to the node is called |
A. | successor node |
B. | ancestor node |
C. | internal node |
D. | none of the above |
Answer» B. ancestor node |
36. | Which is/are the application(s) of stack |
A. | function calls |
B. | large number arithmetic |
C. | evaluation of arithmetic expressions |
D. | all of the above |
Answer» D. all of the above |
37. | A …………… is an acyclic digraph, which has only one node with indegree 0, and other nodes have in-degree 1. |
A. | directed tree |
B. | undirected tree |
C. | dis-joint tree |
D. | direction oriented tree |
Answer» A. directed tree |
38. | …………………. Is a directed tree in which outdegree of each node is less than or equal to two. |
A. | unary tree |
B. | binary tree |
C. | trinary tree |
D. | both b and c |
Answer» B. binary tree |
39. | Which of the following data structure is non-linear type? |
A. | strings |
B. | lists |
C. | stacks |
D. | tree |
Answer» D. tree |
40. | Which of the following data structure is linear type? |
A. | array |
B. | tree |
C. | graphs |
D. | hierarchy |
Answer» A. array |
41. | The logical or mathematical model of a particular organization of data is called a ……… |
A. | data structure |
B. | data arrangement |
C. | data configuration |
D. | data formation |
Answer» A. data structure |
42. | The simplest type of data structure is ……………… |
A. | multidimensional array |
B. | linear array |
C. | two dimensional array |
D. | three dimensional array |
Answer» B. linear array |
43. | Linear arrays are also called ………………. |
A. | straight line array |
B. | one-dimensional array |
C. | vertical array |
D. | horizontal array |
Answer» B. one-dimensional array |
44. | Arrays are best data structures ………… |
A. | for relatively permanent collections of data |
B. | for the size of the structure and the data in the structure are constantly changing |
C. | for both of above situation |
D. | for none of the above |
Answer» A. for relatively permanent collections of data |
45. | Which of the following data structures are indexed structures? |
A. | linear arrays |
B. | linked lists |
C. | graphs |
D. | trees |
Answer» A. linear arrays |
46. | Each node in a linked list has two pairs of ………….. and ………………. |
A. | link field and information field |
B. | link field and avail field |
C. | avail field and information field |
D. | address field and link field |
Answer» A. link field and information field |
47. | A …………………… does not keep track of address of every element in the list. |
A. | stack |
B. | string |
C. | linear array |
D. | queue |
Answer» C. linear array |
48. | When does top value of the stack changes? |
A. | before deletion |
B. | while checking underflow |
C. | at the time of deletion |
D. | after deletion |
Answer» D. after deletion |
49. | Arrays are best data structures ………… |
A. | for relatively permanent collections of data. |
B. | for the size of the structure and the data in the structure are constantly changing |
C. | for both of above situation |
D. | for none of the above |
Answer» A. for relatively permanent collections of data. |
51. | The disadvantage in using a circular linked list is ……………………. |
A. | it is possible to get into infinite loop. |
B. | last node points to first node. |
C. | time consuming |
D. | requires more memory space |
Answer» A. it is possible to get into infinite loop. |
52. | A linear list in which each node has pointers to point to the predecessor and successors nodes is called as .. |
A. | singly linked list |
B. | circular linked list |
C. | doubly linked list |
D. | linear linked list |
Answer» C. doubly linked list |
53. | A ……………….. is a linear list in which insertions and deletions are made to from either end of the structure. |
A. | circular queue |
B. | random of queue |
C. | priority |
D. | dequeue |
Answer» D. dequeue |
54. | In a priority queue, insertion and deletion takes place at ……………… |
A. | front, rear end |
B. | only at rear end |
C. | only at front end |
D. | any position |
Answer» D. any position |
55. | The time complexity of quick sort is ………….. |
A. | o(n) |
B. | o(n2) |
C. | o(n log n) |
D. | o(log n) |
Answer» C. o(n log n) |
56. | Which of the following is an application of stack? |
A. | finding factorial |
B. | tower of hanoi |
C. | infix to postfix conversion |
D. | all of the above |
Answer» B. tower of hanoi |
57. | The data structure which is one ended is ……………… |
A. | queue |
B. | stack |
C. | tree |
D. | graph |
Answer» B. stack |
58. | A list which displays the relationship of adjacency between elements is said to be |
A. | linear |
B. | non linear |
C. | linked list |
D. | trees |
Answer» A. linear |
59. | ……………….. level is where the model becomes compatible executable code |
A. | abstract level |
B. | application level |
C. | implementation level |
D. | all of the above |
Answer» C. implementation level |
60. | Which of the following data structure is not linear data structure? |
A. | arrays |
B. | linked lists |
C. | both of the above |
D. | none of the above |
Answer» D. none of the above |
61. | Inserting an item into the stack when stack is not full is called …………. Operation and deletion of item form the stack, when stack is not empty is called ………..operation. |
A. | push, pop |
B. | pop, push |
C. | insert, delete |
D. | delete, insert |
Answer» A. push, pop |
62. | Each array declaration need not give, implicitly or explicitly, the information about |
A. | the name of array |
B. | the data type of array |
C. | the first data from the set to be stored |
D. | the index set of the array |
Answer» C. the first data from the set to be stored |
63. | The elements of an array are stored successively in memory cells because |
A. | by this way computer can keep track only the address of the first element and the addresses of other elements can be calculated |
B. | the architecture of computer memory does not allow arrays to store other than serially |
C. | both of above |
D. | none of above |
Answer» A. by this way computer can keep track only the address of the first element and the addresses of other elements can be calculated |
64. | Linked lists are best suited |
A. | for relatively permanent collections of data |
B. | for the size of the structure and the data in the structure are constantly changing |
C. | for both of above situation |
D. | for none of above situation |
Answer» B. for the size of the structure and the data in the structure are constantly changing |
65. | Finding the location of the element with a given value is: |
A. | traversal |
B. | search |
C. | sort |
D. | none of above |
Answer» B. search |
66. | The operation of processing each element in the list is known as |
A. | sorting |
B. | merging |
C. | inserting |
D. | traversal |
Answer» D. traversal |
67. | Arrays are best data structures |
A. | for relatively permanent collections of data |
B. | for the size of the structure and the data in the structure are constantly changing |
C. | for both of above situation |
D. | for none of above situatio |
Answer» A. for relatively permanent collections of data |
68. | Which of the following statement is true?i) Using singly linked lists and circular list, it is not possible to traverse the list backwards.ii) To find the predecessor, it is required to traverse the list from the first node in case of singly linked list. |
A. | i-only |
B. | ii-only |
C. | both i and ii |
D. | none of the above |
Answer» C. both i and ii |
69. | What will be the value of top, if there is a size of stack STACK_SIZE is 5 |
A. | 5 |
B. | 6 |
C. | 4 |
D. | none of the above |
Answer» C. 4 |
70. | ………… is not the operation that can be performed on queue. |
A. | insertion |
B. | deletion |
C. | retrieval |
D. | traversal |
Answer» D. traversal |
71. | A data structure where elements can be added or removed at either end but not in the middle is called … |
A. | linked lists |
B. | stacks |
C. | queue |
D. | dequeue |
Answer» D. dequeue |
72. | Which of the following name does not relate to stacks? |
A. | fifo lists |
B. | lifo list |
C. | piles |
D. | push-down lists |
Answer» A. fifo lists |
73. | The term “push” and “pop” is related to the |
A. | array |
B. | lists |
C. | stacks |
D. | all of the above |
Answer» C. stacks |
74. | Which data structure allows deleting data elements from front and inserting at rear? |
A. | stacks |
B. | queue |
C. | dequeue |
D. | binary search tree |
Answer» B. queue |
76. | A circular linked list can be used for |
A. | stack |
B. | queue |
C. | both stack & queue |
D. | neither stack or queue |
Answer» C. both stack & queue |
77. | In doubly linked lists |
A. | a pointer is maintained to store both next and previous nodes. |
B. | two pointers are maintained to store next and previous nodes. |
C. | a pointer to self is maintained for each node. |
D. | none of the above |
Answer» B. two pointers are maintained to store next and previous nodes. |
78. | The disadvantage in using a circular linked list is ……………………. |
A. | it is possible to get into infinite loop |
B. | last node points to first node. |
C. | time consuming |
D. | requires more memory space |
Answer» A. it is possible to get into infinite loop |
79. | A linear list in which each node has pointers to point to the predecessor and successors nodes is called as |
A. | singly linked list |
B. | circular linked list |
C. | doubly linked list |
D. | linear linked list |
Answer» C. doubly linked list |
80. | The situation when in a linked list START=NULL is |
A. | underflow |
B. | overflow |
C. | housefull |
D. | saturated |
Answer» A. underflow |
81. | In doubly linked lists, traversal can be performed? |
A. | only in forward direction |
B. | only in reverse direction |
C. | in both directions |
D. | none of the above |
Answer» C. in both directions |
82. | What differentiates a circular linked list from a normal linked list? |
A. | you cannot have the ‘next’ pointer point to null in a circular linked list |
B. | it is faster to traverse the circular linked list |
C. | you may or may not have the ‘next’ pointer point to null in a circular linked list |
D. | head node is known in circular linked list |
Answer» C. you may or may not have the ‘next’ pointer point to null in a circular linked list |
83. | How do you count the number of elements in the circular linked list? |
A. | public int length(node head) { int length = 0; if( head == null) return 0; node temp = head.getnext(); while(temp != head) { temp = temp.getnext(); length++; } return length; } |
B. | public int length(node head) { int length = 0; if( head == null) return 0; node temp = head.getnext(); while(temp != null) { temp = temp.getnext(); length++; } return length; } |
C. | public int length(node head) { int length = 0; if( head == null) return 0; node temp = head.getnext(); while(temp != head && temp != null) { temp = head.getnext(); length++; } return length; } |
D. | public int length(node head) { int length = 0; if( head == null) return 0; node temp = head.getnext(); while(temp != head && temp == null) { temp = head.getnext(); length++; } return length; } |
Answer» A. public int length(node head) { int length = 0; if( head == null) return 0; node temp = head.getnext(); while(temp != head) { temp = temp.getnext(); length++; } return length; } |
84. | 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. |
A. | return data from the end of the list |
B. | returns the data and deletes the node at the end of the list |
C. | returns the data from the beginning of the list |
D. | returns the data and deletes the node from the beginning of the list |
Answer» D. returns the data and deletes the node from the beginning of the list |
85. | 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; } |
A. | return data from the end of the list |
B. | returns the data and deletes the node at the end of the list |
C. | returns the data from the beginning of the list |
D. | returns the data and deletes the node from the beginning of the list |
Answer» B. returns the data and deletes the node at the end of the list |
86. | How do you insert a node at the beginning of the list? |
A. | public class insertfront(int data) { node node = new node(data, head, head.getnext()); node.getnext().setprev(node); head.setnext(node); size++; } |
B. | public class insertfront(int data) { node node = new node(data, head, head); node.getnext().setprev(node); head.setnext(node); size++; } |
C. | public class insertfront(int data) { node node = new node(data, head, head.getnext()); node.getnext().setprev(head); head.setnext(node); size++; } |
D. | public class insertfront(int data) { node node = new node(data, head, head.getnext()); node.getnext().setprev(node); head.setnext(node.getnext()); size++; } |
Answer» A. public class insertfront(int data) { node node = new node(data, head, head.getnext()); node.getnext().setprev(node); head.setnext(node); size++; } |
87. | What is a dequeue? |
A. | a queue with insert/delete defined for both front and rear ends of the queue |
B. | a queue implemented with a doubly linked list |
C. | a queue implemented with both singly and doubly linked lists |
D. | a queue with insert/delete defined for front side of the queue |
Answer» A. a queue with insert/delete defined for both front and rear ends of the queue |
88. | 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 |
A. | full: (rear+1) mod n == front, empty: rear == front |
B. | full: (rear+1) mod n == front, empty: (front+1) mod n == rear |
C. | full: rear == front, empty: (rear+1) mod n == front |
D. | full: (front+1) mod n == rear, empty: rear == front |
Answer» A. full: (rear+1) mod n == front, empty: rear == front |
89. | 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? |
A. | a queue cannot be implemented using this stack. |
B. | a queue can be implemented where enqueue takes a single instruction and dequeue takes a sequence of two instructions. |
C. | a queue can be implemented where enqueue takes a sequence of three instructions and dequeue takes a single instruction. |
D. | a queue can be implemented where both enqueue and dequeue take a single instruction each. |
Answer» C. a queue can be implemented where enqueue takes a sequence of three instructions and dequeue takes a single instruction. |
90. | 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 ? |
A. | leaves the queue q unchanged |
B. | reverses the order of the elements in the queue q |
C. | deletes the element at the front of the queue q and inserts it at the rear keeping the other elements in the same order |
D. | empties the queue q |
Answer» B. reverses the order of the elements in the queue q |
91. | 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 on an array for almost all the basic LIST operations. iii. Implementing QUEUES on a circular array is more efficient than implementing QUEUES on 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? |
A. | (ii) and (iii) are true |
B. | (i) and (ii) are true |
C. | (iii) and (iv) are true |
D. | (ii) and (iv) are true |
Answer» A. (ii) and (iii) are true |
92. | Which of the following option is not correct? |
A. | if the queue is implemented with a linked list, keeping track of a front pointer, only rear pointer s will change during an insertion into an non-empty queue. |
B. | queue data structure can be used to implement least recently used (lru) page fault algorithm and quick short algorithm. |
C. | queue data structure can be used to implement quick short algorithm but not least recently used (lru) page fault algorithm. |
D. | both (a) and (c) |
Answer» C. queue data structure can be used to implement quick short algorithm but not least recently used (lru) page fault algorithm. |
93. | 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? |
A. | q[0] |
B. | q[1] |
C. | q[9] |
D. | q[10] |
Answer» A. q[0] |
94. | Overflow condition in linked list may occur when attempting to …………. |
A. | create a node when free space pool is empty |
B. | traverse the nodes when free space pool is empty |
C. | create a node when linked list is empty |
D. | none of these |
Answer» A. create a node when free space pool is empty |
95. | Which of the following is not a type of Linked List ? |
A. | doubly linked list |
B. | singly linked list |
C. | circular linked list |
D. | hybrid linked list |
Answer» D. hybrid linked list |
96. | Linked list is generally considered as an example of _________ type of memory allocation. |
A. | static |
B. | dynamic |
C. | compile time |
D. | none of these |
Answer» B. dynamic |
97. | Each Node contain minimum two fields one field called data field to store data. Another field is of type _________. |
A. | pointer to class |
B. | pointer to an integer |
C. | pointer to character |
D. | pointer to node |
Answer» D. pointer to node |
98. | If in a linked list address of first node is 1020 then what will be the address of node at 5th position ? |
A. | 1036 |
B. | 1028 |
C. | 1038 |
D. | none of these |
Answer» D. none of these |
99. | In Circular Linked List insertion of a node involves the modification of ____ links. |
A. | 3 |
B. | 4 |
C. | 1 |
D. | 2 |
Answer» D. 2 |
101. | Linked list uses | |
A. | random memory allocation | |
B. | static memory allocation | |
C. | fixed memory allocation | |
D. | dynamic memory allocation | |
Answer» D. dynamic memory allocation | ||
102. | Standard approach for implementation of a list is/are of |
A. | 1 type |
B. | 2 type |
C. | 3 type |
D. | 4 type |
Answer» B. 2 type |
103. | First link node of list is accessed from a pointer named |
A. | tail |
B. | head |
C. | terminator |
D. | initiator |
Answer» B. head |
104. | A linked list is made up of a set of objects known as |
A. | nodes |
B. | arrays |
C. | entities |
D. | instances |
Answer» A. nodes |
105. | How do you calculate the pointer difference in a memory efficient double linked list? |
A. | head xor tail |
B. | pointer to previous node xor pointer to next node |
C. | pointer to previous node – pointer to next node |
D. | pointer to next node – pointer to previous node |
Answer» B. pointer to previous node xor pointer to next node |
106. | A ……………….. is a linear list in which insertions and deletions are made to from either end of the structure. |
A. | circular queue |
B. | random of queue |
C. | priority |
D. | dequeue |
Answer» D. dequeue |
107. | Which of the following name does not relate to stacks? |
A. | fifo lists |
B. | lifo list |
C. | piles |
D. | push-down lists |
Answer» A. fifo lists |
108. | A data structure where elements can be added or removed at either end but not in the middle is called … |
A. | arrays |
B. | stacks |
C. | queues |
D. | deque |
Answer» D. deque |
109. | The postfix form of the expression (A + B)∗(C∗D − E)∗F / G is |
A. | ab + cd∗e − fg /∗∗ |
B. | / ab + cd ∗ e − f ∗∗g / |
C. | ab + cd ∗ e − ∗f ∗ g / |
D. | ab + cde ∗ − ∗ f ∗ g / |
Answer» A. ab + cd∗e − fg /∗∗ |
110. | What is the postfix form of the following prefix expression -A/B*C$DE ? |
A. | abcde$*/- |
B. | a-bcde$*/- |
C. | abc$ed*/- |
D. | a-bcde$*/ |
Answer» A. abcde$*/- |
111. | The data structure required to evaluate a postfix expression is |
A. | queue |
B. | stacks |
C. | array |
D. | linked-list |
Answer» B. stacks |
112. | What is the postfix form of the following prefix: *+ab–cd |
A. | ab+cd–* |
B. | abc+*– |
C. | ab+*cd– |
D. | ab+*cd– |
Answer» A. ab+cd–* |
113. | A queue is a, |
A. | fifo (first in first out) list |
B. | lifo (last in first out) list |
C. | ordered array |
D. | linear tree |
Answer» A. fifo (first in first out) list |
114. | In stack terminology, the __________operations are known as push and pop operations respectively. |
A. | delete |
B. | insert |
C. | both (a) and (b) |
D. | none of the above |
Answer» C. both (a) and (b) |
115. | A common example of a queue is people waiting in line at a__________. |
A. | bus stop |
B. | movie hall |
C. | shopping mall |
D. | none of the above |
Answer» A. bus stop |
116. | What is one of the common examples of a stack? |
A. | a pile of books |
B. | bus stop |
C. | a basket of fruits |
D. | a carat of eggs |
Answer» A. a pile of books |
117. | When a stack is organized as an array, a variable named Top is used to point to the top element of the stack. Initially, the value of Top is set to_______to indicate an empty stack. |
A. | -1 |
B. | 0 |
C. | 1 |
D. | x |
Answer» A. -1 |
118. | What happens when the stack is full and there is no space for a new element, and an attempt is made to push a new element? |
A. | overflow |
B. | underflow |
C. | top |
D. | none of the above |
Answer» A. overflow |
119. | The total number of elements in a stack at a given point of time can be calculated from the value of______. |
A. | overflow |
B. | top |
C. | queues |
D. | underflow |
Answer» B. top |
120. | When the push operation is performed on stack the value of TOS will be ______ |
A. | decrement |
B. | increment |
C. | one |
D. | none of these |
Answer» B. increment |
121. | A double linked list contains reference to _____ |
A. | previous node |
B. | next node |
C. | current node |
D. | both a & b |
Answer» D. both a & b |
122. | Data Structure that are created by user as per their requirement are known as |
A. | primitive data structure |
B. | non-primitive data structure |
C. | both a & b |
D. | none of these |
Answer» A. primitive data structure |
123. | To insert element at start, the previous pointer of newly added node would point to ______ |
A. | null |
B. | next node |
C. | new node |
D. | head node |
Answer» A. null |
124. | In linked list implementation, a node carries information regarding |
A. | the data |
B. | the link |
C. | both a & b |
D. | none of these |
Answer» C. both a & b |
126. | Stack is ____ type of data structure. |
A. | lifo |
B. | fifo |
C. | both a & b |
D. | none of these |
Answer» A. lifo |
127. | In stack deletion operation is referred as _____ |
A. | push |
B. | pop |
C. | peek |
D. | none of these |
Answer» B. pop |
128. | Queue is _____ type of data structure. |
A. | lifo |
B. | fifo |
C. | both a & b |
D. | none of these |
Answer» B. fifo |
129. | Data structre is divided into _____ parts. |
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
Answer» C. 2 |
130. | In ___ Data Structure data can be processed one by one sequentially |
A. | array |
B. | linked list |
C. | tree |
D. | none of these |
Answer» B. linked list |
131. | When we insert an element in Queue, which pointer is increased by one? |
A. | front |
B. | rear |
C. | both a & b |
D. | none of these |
Answer» B. rear |
132. | Which of the following is not the possible operation on stack? |
A. | push |
B. | pop |
C. | display |
D. | enqueue |
Answer» D. enqueue |
133. | Which of the following is a possible operation on queue? |
A. | push |
B. | pop |
C. | display |
D. | enqueue |
Answer» D. enqueue |
134. | In stack, to display the lastly inserted element without removing it, which function is used? |
A. | push |
B. | pop |
C. | display |
D. | peek |
Answer» D. peek |
135. | if there are no nodes in linked list then start pointer will point at which value? |
A. | null |
B. | garbage |
C. | 1 |
D. | 2 |
Answer» A. null |
136. | Worst space complexity of queue data structure is |
A. | o(n) |
B. | o(log(n)) |
C. | o(1) |
D. | n/a |
Answer» A. o(n) |
137. | Worst space complexity of stack data structure is |
A. | o(log(n)) |
B. | o(1) |
C. | n/a |
D. | o(n) |
Answer» D. o(n) |
138. | Worst space complexity of singly linked list is |
A. | o(n) |
B. | o(1) |
C. | o(log(n)) |
D. | n/a |
Answer» A. o(n) |
139. | Minimum number of fields in each node of a doubly linked list is____ |
A. | 2 |
B. | 3 |
C. | 4 |
D. | None of the above |
Answer» B. 3 |
140. | A graph in which all vertices have equal degree is known as ____ |
A. | Complete graph |
B. | Regular graph |
C. | Multi graph |
D. | Simple graph |
Answer» A. Complete graph |
141. | A vertex of in-degree zero in a directed graph is called a/an |
A. | Root vertex |
B. | Isolated vertex |
C. | Sink |
D. | Articulation point |
Answer» C. Sink |
142. | A graph is a tree if and only if graph is |
A. | Directed graph |
B. | Contains no cycles |
C. | Planar |
D. | Completely connected |
Answer» B. Contains no cycles |
143. | The elements of a linked list are stored |
A. | In a structure |
B. | In an array |
C. | Anywhere the computer has space for them |
D. | In contiguous memory locations |
Answer» C. Anywhere the computer has space for them |
144. | A parentheses checker program would be best implemented using |
A. | List |
B. | Queue |
C. | Stack |
D. | Any of the above |
Answer» C. Stack |
145. | To perform level-order traversal on a binary tree, which of the following data structure will be required? |
A. | Hash table |
B. | Queue |
C. | Binary search tree |
D. | Stack |
Answer» B. Queue |
146. | Which of the following data structure is required to convert arithmetic expression in infix to its equivalent postfix notation? |
A. | Queue |
B. | Linked list |
C. | Binary search tree |
D. | None of above |
Answer» D. None of above |
147. | A binary tree in which all its levels except the last, have maximum numbers of nodes, and all the nodes in the last level have only one child it will be its left child. Name the tree. |
A. | Threaded tree |
B. | Complete binary tree |
C. | M-way search tree |
D. | Full binary tree |
Answer» B. Complete binary tree |
148. | Which of following data structure is more appropriate for implementing quick sort iteratively? |
A. | Deque |
B. | Queue |
C. | Stack |
D. | Priority queue |
Answer» C. Stack |
149. | The number of edges in a complete graph of n vertices is |
A. | n(n+1)/2 |
B. | n(n-1)/2 |
C. | n2/2 |
D. | n |
Answer» B. n(n-1)/2 |
151. | If two trees have same structure and node content, then they are called ____ |
A. | Synonyms trees |
B. | Joint trees |
C. | Equivalent trees |
D. | Similar trees |
Answer» C. Equivalent trees |
152. | Finding the location of a given item in a collection of items is called …… |
A. | Discovering |
B. | Finding |
C. | Searching |
D. | Mining |
Answer» C. Searching |
153. | The time complexity of quicksort is …….. |
A. | O(n) |
B. | O(logn) |
C. | O(n2) |
D. | O(n logn) |
Answer» D. O(n logn) |
154. | Quick sort is also known as …….. |
A. | merge sort |
B. | tree sort |
C. | shell sort |
D. | partition and exchange sort |
Answer» D. partition and exchange sort |
155. | ………. sorting is good to use when alphabetizing a large list of names. |
A. | Merge |
B. | Heap |
C. | Radix |
D. | Bubble |
Answer» C. Radix |
156. | The total number of comparisons in a bubble sort is …. |
A. | O(n logn) |
B. | O(2n) |
C. | O(n2) |
D. | O(n) |
Answer» A. O(n logn) |
157. | ……… form of access is used to add and remove nodes from a queue. |
A. | LIFO, Last In First Out |
B. | FIFO, First In First Out |
C. | Both a and b |
D. | None of these |
Answer» B. FIFO, First In First Out |
158. | New nodes are added to the ……… of the queue. |
A. | Front |
B. | Back |
C. | Middle |
D. | Both A and B |
Answer» B. Back |
159. | The term push and pop is related to |
A. | Array |
B. | Lists |
C. | Stacks |
D. | Trees |
Answer» C. Stacks |
160. | Which of the following is an application of stack? |
A. | finding factorial |
B. | tower of Hanoi |
C. | infix to postfix |
D. | all of the above |
Answer» D. all of the above |
161. | The operation of processing each element in the list is known as …… |
A. | sorting |
B. | merging |
C. | inserting |
D. | traversal |
Answer» D. traversal |
162. | The situation when in a linked list START=NULL is …. |
A. | Underflow |
B. | Overflow |
C. | Houseful |
D. | Saturated |
Answer» A. Underflow |
163. | Which of the following are two-way lists? |
A. | Grounded header list |
B. | Circular header list |
C. | Linked list with header and trailer nodes |
D. | List traversed in two directions |
Answer» D. List traversed in two directions |
164. | Which is the pointer associated with the availability list? |
A. | FIRST |
B. | AVAIL |
C. | TOP |
D. | REAR |
Answer» B. AVAIL |
165. | Which of the following data structure can’t store the non-homogeneous data elements? |
A. | Arrays |
B. | Records |
C. | Pointers |
D. | Stacks |
Answer» A. Arrays |
166. | Which of the following is non-liner data structure? |
A. | Stacks |
B. | List |
C. | Strings |
D. | Trees |
Answer» D. Trees |
167. | To represent hierarchical relationship between elements, which data structure is suitable? |
A. | Dequeue |
B. | Priority |
C. | Tree |
D. | Graph |
Answer» C. Tree |
168. | Identify the data structure which allows deletions at both ends of the list but insertion at only one end. |
A. | Input restricted dequeue |
B. | Output restricted qequeue |
C. | Priority queues |
D. | Stack |
Answer» A. Input restricted dequeue |
Tags
Question and answers in Data Structure (DS),Data Structure (DS) multiple choice questions and answers,Data Structure (DS) Important MCQs,Solved MCQs for Data Structure (DS),Data Structure (DS) MCQs with answers PDF download