DS 2 Marks Model QB
DS 2 Marks Model QB
ENGINEERING COLLEGE
RSM Nagar, Kavaraipettai – 601 206
16. State the rules to be followed during infix to postfix conversions K2 CO2 S
17. What are the conditions to be checked before inserting a new element in a K2 CO2 S
circular queue?
There are two conditions for inserting a new node into the linked circular
queue. In the first condition, you will insert a new node into an empty queue.
In this case, both the front and rear pointer must be Null. You must check it
using the condition rear == -1
18. What is priority queue? What are the ways to implement priority queue?
A priority queue is a special type of queue in which each
element is associated with a priority value. And, elements are K2 CO2 A
served on the basis of their priority. That is, higher priority
elements are served first. Priority queue can be implemented using the
following data structures: Arrays. Linked list. Heap data structure.
20. Represent circular queue with a diagram and list its operations.
A circular queue is the extended version of a regular
queue where the last element is connected to the first
K1 CO2 A
element. Thus forming a circle-like structure.
Enqueue operation
Dequeue operation
21. What do you mean by level of tree?
In a tree, each step from top to bottom is called as level of a tree. The K1 CO3 A
level count starts with 0 and increments by 1 at each level or step.
26. Show the result of inorder traversal of the binary search tree given in below
Figure.
K3 CO3 S
K1 CO4 S
35. Write down any 4 types of graph with its diagrammatic representation.
Undirected
Directed K1 CO4 S
Weighted
unweighted
40. State the requirements of Euler circuit and path in directed graph.
The Euler Circuit is a special type of Euler path. When the starting vertex of
the Euler path is also connected with the ending vertex of that path, then it is K1 CO4 A
called the Euler Circuit. The graph must be connected. The in-degree and
out-degree of each vertex must be the same.
42. What are the advantage and disadvantage of separate chaining and linear
probing?
K2 CO5 S
K3 CO6 S
48. Given the hash value of 100 locations, calculate the hash value using folding
method for the keys 5678 and 321.
K3 CO6 S