Question: b ) Using only diagrams, illustrate how to perform the following array operations on array A . i . Insert 1 8 at index, 2

b) Using only diagrams, illustrate how to perform the following array operations
on array A.
i. Insert 18 at index, 2
[4marks]
ii. Insert 15 at index, 0
iii. Delete element 21
iv. Delete the element at index 0
A
c) Using only diagrams and queue operations, demonstrate the difference
between a linear queue and a circular queue.
[3marks]
d) Demonstrate the insertion of the following keys: 34,12,10,78,9,23,7,10,
35,28,18 into a Binary Search Tree (BST).
(13) marks]
i. Draw the BST after deleting 10 and 34.
QUESTION FOUR
a) Compute the running time of the algorithm below.
b) Explain why a stack is known as a LIFO data structure.
b ) Using only diagrams, illustrate how to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!