DATA STRUCTURES - MCQ - II
Data
Structures
1.
Which of 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
2.
The best data structure to check whether an arithmetic expression has balanced
parentheses
a)
Queue b) Stack c) Tree d) List
3.
Stack data structure is needed to convert
a) infix to
postfix notation b)
prefix to postfix notation c)
postfix to infix notation d) infix
to prefix notation
4.
Stack is useful for implementing
a)
radix sort b)breadth-first search c)recursion d)depth-first search
5.
Pre-order is same as
a)
breadth-first order b) depth-first order c) linear order c) topological order
6.
Which of the following traversal techniques lists the nodes of a binary search
tree in ascending order?
a)
post-order b) pre-order c) in-order d) none of the above
7.
The average successful search time for sequential search on ‘n’ items is
a)n/2 b)(n-1)/s c)(n+1)/2 d)log(n)+1
8.
Given two sorted list of size ‘m’ and ‘n’ respectively. The number of comparisons needed in the
worst case by the merge sort algorithm will be
a)
m+n b)
maximum of m, n c) minimum of m,
n d) m+n-1
9. Which of the following is useful in
implementing quick sort?
a) stack b)
set c)
list d) queue
10.
Which of the following is useful in traversing a given graph by breadth-first search?
a)
stack b) set c) list d) queue
11.
The process of accessing data stored in a tape is similar to manipulating data
on a
a)
stack b) heap c) list d) queue
12. Quick sort algorithm is an example of
a) Greedy approach b) Dynamic Programming c) Divide and conquer d) Backtracking
13. The time required to search an
element in a linked list of length n is
a)O (log n) b) O (n) c) O (1) d) O(n2)
14. When new data are to be inserted
into a data structure, but there is not available space; this situation is
usually called
a) underflow b)overflow c)houseful d)saturated
15.
Inserting an item into the stack when stack is not full is called _____________
operation and deletion of item from the stack, when stack is not empty is
called ______________ operation.
a) push, pop b) insert, delete c)delete,
insert d)pop, push
16.
Queue is also called as
a)
last in first out b) first in first out c)
last in last out d) first in first out
17.
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
18.
State True or False.
i)
Binary search is used for searching in a sorted array.
ii)
The time complexity of binary search is O(log n).
a)
True, False b) False, False c) True, True d) False,
True
19.
Which of the following is a non-linear data structure?
a)
Array b) Stack c) Queue d) Tree
20.
Which one of the following is an application of Queue Data Structure?
a) When a resource is shared among multiple consumers.
b) When data is transferred asynchronously (data not necessarily received at
same rate as sent) between two processes
c) Load Balancing
d) All of the above
Comments
Post a Comment