Q1. Explain any four characteristics of the top down approaches to algorithmic design.
Q2. Can a Queue be symbolized by circular linked list with just one pointer pointing to the tail of the queue? Validate your answer by using an illustration.
Q3. Describe the term ‘garbage collection’. Differentiate between best fit and worst fit memory allocation strategies.
Q4. A Binary tree consists of 9 nodes. The In-order and preorder traversals of the tree yield the given sequence of nodes:
In-order: E A C K F H D B G
Pre-order: F A E K C D H G B
Draw the tree. Describe the steps performed in the algorithm.
Q5. Consider the given stack of characters, where STACK is allocated N = 8 memory cells STACK : A,C,D,F,K,_,_,_. (_ signifies empty allocated cell). Explain the stack as the given operations occurs:
a) POP(STACK, ITEM)
b) POP(STACK, ITEM)
c) POP(STACK, ITEM)
d) PUSH(STACK, R)
e) PUSH(STACK,L)
f) PUSH(STACK, S)
g) PUSH(STACK,P)
h) POP(STACK, ITEM)