Data Structure and Algorithms (DSA)
13 of 14 sets
601. The complexity of the average case of an algorithm is
A. Much more complicated to analyze than that of worst case
B. Much more simpler to analyze than that of worst case
C. Sometimes more complicated and some other times simpler than that of worst case
D. None of the above
Answer:A
602. The following data structure allows deleting data elements from front and
inserting at rear
A. Stacks
o m
B. Queues
. c
C. Deques
te
D. Binary search tree
a
Answer:B
q M
c
M
603. This data structure allows deletions at both ends of the list but insertion at
only one end.
A. Input-restricted deque
B. Output-restricted deque
C. Priority queues
D. None of the above
Answer:A
604. The following data structure is non-linear type
A. Strings
B. Lists
C. Stacks
D. None of the above
Answer:D
605. The following data structure is linear type
A. Strings
B. Lists
C. Queues
D. All of the above
Answer:D
606. To represent hierarchical relationship be- tween elements, the following data
structure is not suitable
A. Deque
B. Priority
C. Tree
D. All of above
Answer:C
607. A binary tree whose every node has either zero or two children is called
A. Complete binary tree
B. Binary search tree
C. Extended binary tree
D. None of above
Answer:C
608. The depth of a complete binary tree is given by
A. Dn = n log2n
B. Dn = n log2n+1
C. Dn = log2n
D. Dn = log2n+1
Answer:D
609. The complexity of Binary search algorithm is
A. O(n)
B. O(log )
C. O(n log n)
D. None of the above
Answer:B
610. The complexity of Bubble sort algorithm is
View all MCQ's at McqMate.com
A. O(n)
B. O (n2)
C. O(n log n)
D. None of the above
Answer:B
611. When in order traversing a tree resulted E A C K F H D B G; the preorder
traversal would return
A. FAEKCDBHG
B. FAEKCDHGB
C. EAFKHDCBG
D. FEAKDCHBG
Answer:B
612. When representing any algebraic expression E the following uses only binary
operations in a 2-tree
A. the variable in E will appear as external nodes and operations in internal nodes
B. the operations in E will appear as exter- nal nodes and variables in internal nodes
C. the variables and operations in E will appear only in internal nodes
D. None of the above
Answer:A
613. When converting binary tree into extended binary tree, all the original nodes
in binary tree are
A. internal nodes on extended tree
B. external nodes on extended tree
C. vanished on extended tree
D. None of the above
Answer:A
614. The post order traversal of a binary tree is DEBFCA. Find out the pre order
traversal
A. ABFCDE
B. ADBFEC
C. ABDECF
D. None of the above
View all MCQ's at McqMate.com
Answer:C
615. Which of the following data structure is lin- ear data structure?
A. Trees
B. Graphs
C. Arrays
D. None of the above
Answer:C
616. The operation of processing each element in the list is known as
A. Merging
B. Inserting
C. Traversal
D. All the above
Answer:C
617. Finding the location of the element with a given value is called
A. Traversal
B. Search
C. Sort
D. All of the above
Answer:B
618. Arrays are best data structures for
A. relatively permanent collections of data
B. the size of the structure and the data in the structure are constantly changing
C. both of above situation
D. none of above situation
Answer:A
619. Linked lists are best suited for
A. relatively permanent collections of data
B. the size of the structure and the data in the structure are constantly changing
C. both of above situation
D. none of above situation
View all MCQ's at McqMate.com
Answer:B
620. Each array declaration need not give, implicitly or explicitly, the information
about the
A. name of array
B. data type of array
C. first data from the set to be stored
D. index set of the array
Answer:C
621. The complexity of merge sort algorithm is
A. O(n)
B. O(log n)
C. O(n log n)
D. None of these
Answer:C
622. The indirect change of the values of a vari- able in one module by another
module is called
A. internal change
B. inter-module change
C. side effect
D. all the above
Answer:C
623. Two main measures for the efficiency of an algorithm are
A. Time and space
B. Processor and memory
C. Complexity and capacity
D. Data and space
Answer:A
624. The time factor when determining the effi- ciency of algorithm is measured by
A. Counting the number of key operations
B. Counting the number of statements
C. Counting the kilobytes of algorithm
View all MCQ's at McqMate.com
D. None of the above
Answer:A
625. The space factor when determining the effi- ciency of algorithm is measured
by
A. Counting the maximum memory needed by the algorithm
B. Counting the minimum memory needed by the algorithm
C. Counting the average memory needed by the algorithm
D. Counting the maximum disk space needed by the algorithm
Answer:A
View all MCQ's at McqMate.com