# a) Using the Stack and the Queue structures explain the LIFO and FIFO principle in data management.

## Question:

a) Using the Stack and the Queue structures explain the LIFO and FIFO principle in data management.

b) Explain the statement "the time taken by an algorithm grows with the size of the input"

c)What are the advantages of the data structure Queue? What type of data structure would you recommend for storing data?.

d) Draw a complete binary tree with exactly 7 nodes. Put different values in each node. Then draw an array with 7 elements and show where each of the 7 node value would be placed in the array (using the usual array representation of a complete binary tree).

e) With the help of diagrams explain the Heap data structure. Use that same diagram to explain

i. max — heap

ii. min — heap

(f). Distinguish between the worst-case and the average-case running time and the factors that affect the running time of an algorithm.

**Related Book For**

**Posted Date:**