UNIVERSITY OF CAPE COAST
COLLEGE OF HEALTH AND ALLIED SCIENCES SCHOOL OF ALLIED HEALTH SCIENCES
DEPARTMENT OF HEALTH INFORMATION MANAGEMENT
Attempt ALL questions in this section
Instructions: answer the following questions by encircling the single best answer from options (A-D)
Q1 A linear list of elements in which deletion can be done from one end (front) and insertion can take
place only at the other end (rear) is known as a
A) queue
B) stack
C) tree
D) link list
Q2 The numbers 6, 8, 4, 3, and I are inserted into a data structure in that order. An item is deleted using
only a basic data structure operation. If the deleted item is a 1, the data structure cannot be a....?
A) queue
B) stack
C) tree
D) hash table
Q3 The elements of an array ure stored successively in memory cells because.....
A) by this way computer can keep track only the address of the first element and the Addresses of other
element can be calculated
B) the architecture of the computer memory does not allow arrays to store other than serially
C) both of the above.
D) none of the above
Q4 Arrays are best data structures...
A) for relatively permanent collection of data
B) for the size of the structure and the data in the structure are constantly changing
C) for both of the above situation
D) for none of the above situation
Q5 Which of the following will you use to overcome the limitations of an array?
A)linked list
B) queue
C) stack
D) binary tree
Q6 Link list is a dynamic data structure.
A) true
B) false
Q7 Space in linked list is created i) created when needed ii) destroyed when not need ili) use only when
available
A) I only
B) I and ii only
C) i, ii, iii only
D) none of the above
Q8 A queue is a,
(A) FIFO (First In First Out) list
B) LIFO (Last In First Out) list
C) Ordered array
D) Linear tree
Q9 Two dimensional arrays are also called
A) tables arrays
B) matrix arrays
C) both of the above
D) none of the above
Q10 A linear list of elements in which deletion can be done from one end (front) and insertion can take
place only at the other end (rear) is known as a
A) queue
D. stack
C. tree
D. linked list
Q11 Which of the following defines in pre order traversal?
A) Traverse the left subtree, traverse the right subtree, visit the root
B) Visit the root, Traverse the left subtree, traverse the right subtree
C) Traverse the right subtree, visit the root, Traverse the left subtree,
D) Traverse the left subtree, visit the root, traverse the right subtree
Figure 1 Use the diagram below to answer the following questions
Q12 If the nodes of the tree in figure 1 above are visited in the order: 1245367, it represents..
A) Pre post order traversal
B) In order traversal
C) Post order traversal
D) Pre order traversal
Q13 If the nodes of the tree in figure 1 above are visited in the order: 4 2 5 1 6 3 7, it represents.
A) Pre post order traversal
B) In order traversal
C) Post order traversal
D) Pre order traversal
Q14 if the nodes of the tree in figure 1 above are visited in the order: 4 5 2 6 7 3 1, it represents...
A) Pre post order traversal
B) In order traversal
C) Post order traversal
D) pre order traversal
Q15 What type of tree does figure 1 represents?
A) Ordinary Binary tree
B) Complete binary tree
C) Incomplete binary tree
D) Full binary tree
D) Full binary tree
Q16 What type of tree does figure 1 represents if the leaf nades 6 and 7 are missing?
A) Ordinary Binary tree
B) Complete binary tree
C) Incomplete binary tree
D) Full binary tree
Q17 In figure 1, if the nodes 6 and 7 are children, how would you refer to node 3?
A) brothers
B) sisters
C) parent
D) sibling
Q18 How is Data in a queue accessed?
A) First in First out
B) First in last out
C) Last in First out
D) None of these
Figure 2 represents a tree, use it to answer the following question
Q19 In figure 2, the root node is...
A) J
B) K
C) A
D) E
Q20 How many root nodes can there be in figure 2?
A) 2
B) 4
C) 3
D) 1
Q21 in figure 2, the leaf nodes are
A) B, C and D only
B) E. J. K. H and I only
C) J and K only
D) E and only
Q22 If the root node of figure 2 is at level zero, what is the level of the set of nodes J and K
A) 1
B) 2
C) 3
D) 4
Q23 The height of the tree represented by figure 2 is
A) 2
B) 3
C) 1
D) 4
Q24 Figure 2 cannot be a binary tree.
A) True
B) False
Q25 Which of the following is NOT a basic operation of a binary tree?
A) Inserting an element into a tree
B) Deleting an element from a tree
C) Finding the height of the tree
D) Traversing the tree
Q26 The minimum number of children in a binary tree is.....
A) 1
B) 2
C) 3
D) 0
Q27 The maximum number of children in a binary tree is..
A) 1
B) 2
C) 3
D) 0
Figure 3:
Use FIGURE 3 to answer the following questions
Q28 The nodes in figure 3 are traversed pre order and the result is kept in stack, What is the order of the
elements in the stack?
A) 1.4.2.3.6.7.5
B) 1.2.4.5.3,6,7
C) 4.2.5,1.6.3.7
D) 4,5,7,6,7,3.1
Q29 The nodes in figure 3 are traversed pre order and the result is kept in a stack What is the order of
the elements left in the stack if four (4) elements are pop out?
A) 1,4,2
B) 1,2,4
C) 4,2,5
D) 4,5,2
Q30 The elements in figure 3 are traversed post order, and the results keep in a stack in that order.
What would happen if you pop 8 times?
A) underflow
B) overflow
C) 1 will be remain in the stack
D) 4 will be remain in the stack