WorksheetsData Structures
Total questions: 12
Worksheet time: 11mins
Matrix A - p rows, q columns
Matrix B - s rows, t columns
if ((p !=s) && (q!=t)) - Then what will happen for Addition of Matrix A and B?
(a)
Consider the following statements in a Queue:
enqueue(8);
enqueue(2);
enqueue(6);
enqueue(4);
dequeue();
enqueue(5);
What is the current size of the queue?
5
6
4
3
If the elements P, W,S,D are placed in a stack and are deleted one at a time, what is the order of removal?
PWSD
PDWS
DWSP
DSWP
Write the postfix notation of the following infix expression.
A+B*C+(D*E+F)*G
(a)
Write only the function to delete a node at the beginning of a doubly linked list.
Queue Implementation using Array. Array name is Queuearray and rear is the current element pointer and "data" is the new item to be added. For adding a new element int the queue, is the following statement correct?
queue[rear] = data;
Queuearray[rear] = data;
True
False
An exam was attended by 80 students. Min marks-0, Max Mark-50. I need to store the frequency of marks >30. What will be the size of the array needed for it?
80
20
30
50
Below is a stack operation
int x = a[top--];
return x;
if top becomes zero, then what is that condition called?
overflow
underflow
pop
push
Write the condition to check whether a queue is full or not?
(rear, front are the pointers, size of the array =MAX)
(a)
What is the way to increment the rear end of a circular queue?
(Rear+1) mod MAX
Rear mod MAX
(Front+1) mod MAX
(Rear-1) mod MAX
Write the function to insert a node to the beginning of a singly linked list?
The front and rear pointers of a queue are monitored in a linked list implementation. During an insertion into a NONEMPTY queue, which of these pointers would change?
Only rear pointer
Only Front pointer
Both Front and Rear
