Data Structure And Algorithm Questions And Answers Plus Online Quiz by LUBAN
BROUGHT TO YOU BY; Obibinii Ba Media
SPONSORED BY; Let Us Build Africa Now-LUBAN
You can start the quiz by joining our LUBAN CLASS after going through these questions.
Please click on the Quiz icon below to start the quiz.
1. 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. pop, push
C. insert, delete
D. delete, insert
2. ……………. is a pile in which items are added at one end and removed from the other.
A. Stack
B. Queue
C. List
D. None of the above
3. ………… is very useful in situation when data have to stored and then retrieved in reverse order.
A. Stack
B. Queue
C. List
D. Link list
4. Which of the following is not the type of queue?
A. Ordinary queue
B. Single ended queue
C. Circular queue
D. Priority queue
5. The property of binary tree is
A. The first subset is called left subtree
B. The second subtree is called right subtree
C. The root cannot contain NULL
D. The right subtree can be empty
6. Any node is the path from the root to the node is called
A. Successor node
B. Ancestor node
C. Internal node
D. None of the above
7. Stack is also called as
A. Last in first out
B. First in last out
C. Last in last out
D. First in first out
8. The advantage of …………….. is that they solve the problem if sequential storage representation but disadvantage in that is they are sequential lists.
A. Lists
B. Linked Lists
C. Trees
D. Queues
9. What will be the value of top, if there is a size of stack STACK_SIZE is 5
A. 5
B. 6
C. 4
D. None
10. ………… is not the operation that can be performed on queue.
A. Insertion
B. Deletion
C. Retrieval
D. Traversal
11. ………………. is not an operation performed on linear list
A. Insertion
B. Deletion
C. Retrieval
D. None of the above
12. Which is/are the application(s) of stack
A. Function calls
B. Large number Arithmetic
C. Evaluation of arithmetic expressions
D. All of the above
13. …………………. Is a directed tree in which outdegree of each node is less than or equal to two.
A. Unary tree
B. Binary tree
C. Dinary tree
D. Both B and C
14. There is an extra element at the head of the list called a ……….
A. Antinel
B. Sentinel
C. List header
D. List head
15. Other name for directed graph is ..........
A. Direct graph
B. Digraph
C. Dir-graph
D. Digraph
16. Graph G is .............. if for any pair u, v of nodes in G there is a path from u to v or path from v to u.
A. Leterally connected
B. Widely Connected
C. Unliterally connected
D. Literally connected
17. A connected graph T without any cycles is called ........
A. free graph
B. no cycle graph
C. non cycle graph
D. circular graph
18. A connected graph T without any cycles is called a ........
A. A tree graph
B. Free tree
C. A tree d
D. All of the above
19. In threaded binary tree ......... points to higher nodes in tree.
A. Info
B. Root
C. Threads
D. Child
20. The line drawn from a node N of tree T to a successor is called .......
A. Path
B. Edge
C. Arrow
D. Route
21. In a binary tree a sequence of consecutive edges is called ......
A. Rotate
B. Connecting lines
C. Two-way
D. Path
22. A terminal node in a binary tree is called ............
A. Root
B. Leaf
C. Child
D. Branch
23. 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
24. Sequential representation of binary tree uses........
A. Array with pointers
B. Single linear array
C. Two dimensional arrays
D. Three dimensional arrays
25. TREE[1]=NULL indicates tree is ........
A. Overflow
B. Underflow
C. Empty
D. Full
26. Linked representation of binary tree needs ......... parallel arrays.
A. 4
B. 2
C. 3
D. 5
27. In a 2-tree, nodes with 0 children are called............
A. Exterior node
B. Outside node
C. Outer node
D. External node
30. In a extended-binary tree nodes with 2 children are called........
A. Interior node
B. Domestic node
C. Internal node
D. Inner node
31. The post order traversal of a binary tree is DEBFCA. Find out the pre order Traversal.
A. ABFCDE
B. ADBFEC
C. ABDECF
D. ABDCEF
32. Two main measures for the efficiency of an algorithm are
A. Complexity and capacity
B. Time and space
C. Data and space
D. Processor and memory
Feedback
33. In a Circular Linked List
A. There is no start pointer
B. There is no null Pointer
C. There is no Underflow
D. There is always overflow
34. QUEUE uses the Last In First Out operation
A. True
B. False
35. Which of the following will cause UNDERFLOW in Queue?
A. IF FRONT == NULL
B. IF FRONT == REAR + 1
C. IF REAR == N and N is the last location
D. IF FRONT == 1 and REAR == 1
36. Which of the following is a non-primitive data type?
A. Integer
B. Character
C. Linked_List
D. Boolean
37. In a Single Link List_________ node contains no links
A. Last
B. middle
C. First
D. last but one
38. What is the worst-case time for serial search finding a single item in an array?
A. Quadratic time
B. Constant time
C. Linear time
D. Logarithmic time
39. Which of the following will contain more memory space
A. Array
B. Doubly linked list
C. Singly linked list
D. Circular linked list
40. To represent hierarchical relationship between elements, which data structure is suitable
A. Tree
B. Doubly linked list
C. Circular Queue
D. Stack
41. Representation of data structure in memory is known as
A. Storage structure
B. File structure
C. Abstract data type
D. Recursive
Feedback
42. Automatically collecting all unused memory space onto the available space
A. Automatic collection
B. Garbage collection
C. Memory collection
D. Space collection
43. One advantage of linked list is
A. They are dynamic in nature
B. The memory is wasted as pointers require extra memory for storage
C. No element can be accessed randomly
D. Increases access time
44. Input instance for which algorithm take minimum possible time is called
A. Null case
B. Average case
C. Best case
D. Worst case
45. Which of the following is a primitive data type?
A. Stack
B. Linked-List
C. Boolean
D. Tree
46. Which of the following is true when an element is removed from a stack?
A. TOP = TOP - 1
B. REAR = FRONT
C. TOP = TOP + 1
D. REAR = REAR -1
47. The time factor when determining the efficiency of algorithm is measured by
A. Counting the number of key operations
B. Counting microseconds
C. Counting the number of statements
D. Counting the kilobytes of algorithm
48. What is the index of the last element of an array with 20 elements?
A. 19
B. 21
C. 20
D. 18
49. A pile in which items are added at one end and removed from the same end is
A. Tree
B. Stack
C. Queue
D. Array
50. To perform ENQUEUE operation check
A. Hard disk capacity
B. Underflow
C. Memory capacity
D. Overflow
51. In which notation does operator come after operands?
A. Infix
B. Postfix
C. None
D. Prefix
Kindly click on FOLLOW US icon below to follow Obibinii Ba Media to be the first to get more updates.


