Data Structure and Algorithms (DSA)
14 of 14 sets
651. All the above* Which of the following data structures are indexed structures
A. linear arrays
B. linked lists
C. both of above
D. none of above
Answer:A
652. Which of the following is not the required condition for binary search
algorithm
m
A. there must be mechanism to delete and/ or insert elements in list
o
B. the list must be sorted
. c
e
C. there should be the direct access to the middle element in any sublist
t
D. none of the above
a
Answer:A
q M
c
M
653. Which of the following is not a limitation of binary search algorithm ?
A. binary search algorithm is not efficient when the data elements are more than 1000.
B. must use a sorted array
C. requirement of sorted array is expen- sive when a lot of insertion and dele- tions are needed
D. there must be a mechanism to access middle element directly
Answer:A
654. Two dimensional arrays are also called
A. tables arrays
B. matrix arrays
C. both of the above
D. none of the above
Answer:C
655. The term “push” and “pop” is related to the
A. Array
B. Lists
C. stacks
D. all of above
Answer:C
656. A data structure where elements can be added or removed at either end but
not in the middle is referred as
A. Linked lists
B. Stacks
C. Queues
D. Deque
Answer:D
657. The following sorting algorithm is of divide- and-conquer type
A. Bubble sort
B. Insertion sort
C. Quick sort
D. None of the above
Answer:C
Explanation:- Quick sort is a divide-and-conquer sorting algorithm that works by partitioning a list of
items into two smaller lists and then sorting each of these lists recursively. It is an efficient and
widely used algorithm, with an average case time complexity of O(n log n).
Bubble sort and insertion sort are both comparison-based sorting algorithms, but they do not use the
divide-and-conquer approach. Bubble sort works by repeatedly swapping adjacent elements that are
out of order, while insertion sort works by iteratively inserting each element into its correct position in
the sorted list. Both of these algorithms have a time complexity of O(n^2) in the worst case.
658. An algorithm that calls itself directly or indi- rectly is known as
A. Recursion
B. Polish notation
C. Traversal algorithm
D. None of the above
Answer:A
View all MCQ's at McqMate.com
659. The elements of an array are stored suc- cessively 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. A and B both false
D. A and B both true
Answer:A
660. The memory address of the first element of an array is called
A. base address
B. floor address
C. foundation address
D. first address
Answer:A
661. The memory address of fifth element of an array can be calculated by the
formula
A. LOC(Array[5])=Base(Array[5])+(5-lower boun(D), where w is the number of words per memory
cell for the array
B. LOC(Array[5])=Base(Array[4])+(5-Upper boun(D), where w is the number of words per memory
cell for the array
C. LOC(Array[5]=Base(Array)+w(5-lower bou
D. , where w is the number of words per memory cell for the array
Answer:C
662. The following data structure can’t store the non-homogeneous data elements
A. Arrays
B. Records
C. Pointers
D. None of the above
Answer:A
663. The in order traversal of tree will yield a sorted listing of elements of tree in
A. Binary trees
B. Binary search trees
C. Heaps
View all MCQ's at McqMate.com
D. None of above
Answer:B
664. In a Heap tree values in a node is greater than
A. every value in left sub tree and smaller than right sub tree
B. every value in children of it
C. Both of above conditions are true
D. None of above conditions are true
Answer:B
665. In a graph if e=[u, v], Then u and v are called
A. endpoints of e
B. adjacent nodes
C. neighbors
D. all of the above
Answer:D
666. A connected graph T without any cycles is called
A. tree graph
B. free tree
C. tree
D. All of the above
Answer:D
667. The difference between linear array and a record is
A. An array is suitable for homogeneous data but hte data items in a record may have different
data type
B. In a record, there may not be a natural ordering in opposed to linear array.
C. A record form a hierarchical structure but a linear array does not
D. All of above
Answer:D
668. The following data structure store the ho- mogeneous data elements
A. Arrays
B. Records
View all MCQ's at McqMate.com
C. Pointers
D. None of the above
Answer:A
669. Which of the following data structure is not linear data structure?
A. Arrays
B. Linked lists
C. A and B are true
D. None is true
Answer:C
View all MCQ's at McqMate.com