Computer Quiz
1. 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
(A) Dn = n log2n
(B) Dn = n log2n+1
(C) Dn = log2n
(D) Dn = log2n+1
(A) O(n)
(B) O(log )
(C) O(n log n)
(D) None of the above
3. The complexity of Bubble sort algorithm is
(A) O(n)
(B) O (n2)
(C) O(n log n)
(D) None of the above
(A) O(n)
(B) O (n2)
(C) O(n log n)
(D) None of the above
4. 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
(A) FAEKCDBHG
(B) FAEKCDHGB
(C) EAFKHDCBG
(D) FEAKDCHBG
5. 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 external nodes and variables in internal nodes
(C) the variables and operations in E will appear only in internal nodes
(D) None of the above
(A) the variable in E will appear as external nodes and operations in internal nodes
(B) the operations in E will appear as external nodes and variables in internal nodes
(C) the variables and operations in E will appear only in internal nodes
(D) None of the above
6. 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
(A) internal nodes on extended tree
(B) external nodes on extended tree
(C) vanished on extended tree
(D) None of the above
7. 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
(A) ABFCDE
(B) ADBFEC
(C) ABDECF
(D) None of the above
8. Which of the following data structure is linear data structure?
(A) Trees
(B) Graphs
(C) Arrays
(D) None of the above
(A) Trees
(B) Graphs
(C) Arrays
(D) None of the above
9. The operation of processing each element in the list is known as
(A) Merging
(B) Inserting
(C) Traversal
(D) All the above
(A) Merging
(B) Inserting
(C) Traversal
(D) All the above
10. Finding the location of the element with a given value is called
(A) Traversal
(B) Search
(C) Sort
(D) All of the above
Answers: 1. (D) 2. (B) 3. (B) 4. (B) 5. (A) 6. (A) 7. (C) 8. (C) 9. (C) 10. (B)
(A) Traversal
(B) Search
(C) Sort
(D) All of the above
Answers: 1. (D) 2. (B) 3. (B) 4. (B) 5. (A) 6. (A) 7. (C) 8. (C) 9. (C) 10. (B)
0 comments:
Post a Comment
[img]https://1.bp.blogspot.com/-aFPBR4LADew/V85_aRWKXkI/AAAAAAAAHAw/O_N9dmf5tMQu0kSfbC3NU2yCzkLVQV7eACLcB/s320/share.png[/img]