Data Structure and Application (BCS304) Quiz 2024-2025: Thanks For Filling in
Data Structure and Application (BCS304) Quiz 2024-2025: Thanks For Filling in
1 message
&
-->
Which of the following header files must necessarily be included to use dynamic
memory allocation functions?
stdlib.h
stdio.h
memory.h
dos.h
40
74
-18
A normal queue, if implemented using an array of size MAX_SIZE, gets full when?
Front = rear + 1
Rear = MAX_SIZE – 1
Rear = front
Ordered array
Linear tree
node* NEW;
NEW = (node*)malloc(sizeof(node));
START = NEW;
return START;
Traversal
temp = start;
while(temp -> rlink
!= NULL)
temp
-> rlink = new;
new->
llink = temp;
return
start;
Front Insertion
Front Deletion
Back Insertion
Back Deletion
2^K – 1
2^(K-1)
2^K+1
2^K
if(ptr != NULL){
FUNCT(ptr ->leftchild);
FUNCT(ptr ->rightchild);
printf(“%d”, ptr
->data);
INORDER TRAVERSAL
PREORDER TRAVERSAL
POSTORDER TRAVERSAL
What is the speciality about the Inorder traversal of a binary search tree?
Construct a binary tree by using Postorder and Inorder sequences given below.
Inorder: N, M, P, O, Q
Postorder: N, P, Q, O, M
Option 1 Option 2
Option 3 Option 4
The maximum number of edges in any n-vertex
Directed Graph
is _____________________
n(n-1)
n(n-1)/2
(n-1)/2
n(n-1)(n-2)
Queue
Stack
Heap
Array
h(k) = k/m
h(k) = k mod m
h(k) = m/k
h(k) = m mod k
hashing by division
hashing by multiplication
universal hashing
open addressing
With what data structure can a priority queue be implemented?
Array
List
Heap
Tree
Huffman codes