Database MCQS
Database MCQS
(c)
a) A programming language
b) A collection of algorithms
c) A way to store and organize data
d) A type of computer hardware
8. What data structure would you mostly likely see in non recursive implementation
of a recursive algorithm? (a)
a) Stack
b) Linked List
c) Tree
d) Queue
9. Which of the following statement(s) about stack data structure is/are NOT
correct? (b)
a) Top of the Stack always contain the new node
b) Stack is the FIFO data structure
c) Null link is present in the last node at the bottom of the stack
d) Linked List are used for implementing Stacks
10. The data structure required for Breadth First Traversal on a graph is? (d)
a) Array
b) Stack
c) Tree
d) Queue
12. Which of the following points is/are not true about Linked List data structure
when it is compared with an array? (b)
a) Random access is not allowed in a typical implementation of Linked Lists
b) Access of elements in linked list takes less time than compared to arrays
c) Arrays have better cache locality that can make them better in terms of
performance
d) It is easy to insert and delete elements in Linked List
13. Which data structure is based on the Last In First Out (LIFO) principle? (c)
a) Tree
b) Linked List
c) Stack
d) Queue
14. Which of the following application makes use of a circular linked list? (d)
a) Recursive function calls
b) Undo operation in a text editor
c) Implement Hash Tables
d) Allocating CPU to resources
16. Which of the following tree data structures is not a balanced binary tree? (b)
a) Splay tree
b) B-tree
c) AVL tree
d) Red-black tree
17. Which of the following is not the type of queue? (c)
a) Priority queue
b) Circular queue
c) Single ended queue
d) Ordinary queue
18. Which of the following data structures can be used for parentheses matching? (d)
a) n-ary tree
b) queue
c) priority queue
d) stack
19. Which algorithm is used in the top tree data structure? (b)
a) Backtracking
b) Divide and Conquer
c) Branch
d) Greedy
21. Which of the following is the most widely used external memory data
structure? (a)
a) B-tree
b) Red-black tree
c) AVL tree
d) Both AVL tree and Red-black tree
22. Which of the following is also known as Rope data structure? (d)
a) Linked List
b) Array
c) String
d) Cord
for(i=0;i<len;i++)
push(str[i]); // pushes an element into stack
for(i=0;i<len;i++)
pop(); //pops an element from the stack
}
a) yrdnuof nas
b) foundry nas
c) sanfoundry
d) san foundry
24. Which of the following data structure can provide efficient searching of the
elements? (c)
a) binary search tree
b) unordered lists
c) 2-3 tree
d) treap
26. What is the time complexity for searching a key or integer in Van Emde Boas
data structure? (c)
a) O (M!)
b) O (log M!)
c) O (log (log M))
d) O (M2)
27. The optimal data structure used to solve Tower of Hanoi is _________ (d)
a) Tree
b) Heap
c) Priority queue
d) Stack
29. Which is the most appropriate data structure for reversing a word? (a)
a) stack
b) queue
c) graph
d) tree
31. Which of the following is the simplest data structure that supports range
searching? (b)
a) AA-trees
b) K-d trees
c) Heaps
d) binary search trees
35. A data structure in which elements can be inserted or deleted at/from both ends
but not in the middle is? (b)
a) Priority queue
b) Dequeue
c) Circular queue
d) Queue