Consider the following sequence of operations on an empty stack.
push(54); push(52); pop(); push(55); push(62); s = pop();
Consider the following sequence of operations on an empty queue.
enqueue(21); enqueue(24); dequeue(); enqueue(28); enqueue(32); q = dequeue();
The value of s + q is ______
Consider a dynamic hashing approach for 4-bit integer keys:
1. There is a main hash table of size 4.
2. The 2 least significant bits of a key is used to index into the main hash table.
3. Initially, the main hash table entries are empty.
4. Thereafter, when more keys are hashed into it, to resolve collisions, the set of all keys corresponding to a main hash table entry is organized as a binary tree that grows on demand.
5. First, the 3rd least significant bit is used to divide the keys into left and right subtrees.
6. to resolve more collisions, each node of the binary tree is further sub-divided into left and right subtrees based on 4th least significant bit.
7. A split is done only if it is needed, i. e. only when there is a collision.
Consider the following state of the hash table.
Which of the following sequence of key insertions can cause the above state of the hash table (assume the keys are in decimal notation)?
Consider the following statements.
S1 : The sequence of procedure calls corresponds to a preorder traversal of the activation tree.
S2 : The sequence of procedure returns corresponds to a postorder traversal of the activation tree.
Which one of the following options is correct?