Data structures and algorithm
Question 1Consider the list structure given below: myletters
Draw the new structure of the list after performing each of the following operations [4marks]
insert(2, Z, myletters)
insert(0,A, myletters)
set(9,X, myletters)
delete(4,myletters
Write a complete array program to store and display the elements after final operation (a) iv. [6marks]
Given below is queue data structure
11 |
Write a code segment to insert new data item (34) on the queue [5marks]
Write a code segment to remove data item (7) from the queue [5marks]
Consider the expression given below 3*5+9-3/2
Convert the expression into prefix expression. [4marks]
Use stack ADT concept to evaluate the prefix expression generated in (a) [6marks]
Consider the array below:
Convert the array into binary tree.
Perform: pre-order, in-order and post-order traversal on the resulting tree from (a)