Data Structures Design - AD3251 - Important Questions with Answer - Unit 2 - Linear Structures
Data Structures Design - AD3251 - Important Questions with Answer - Unit 2 - Linear Structures
I Year/II Semester
QUESTION BANK
Prepared By,
AD3251_DSD_R2021
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
4931_Grace College of Engineering, Thoothukudi
www.BrainKart.com
UNIT II – 2 Marks Questions with Answers
5. What is abstract data type? What are all not concerned in an ADT?
The abstract data type is a triple of D i.e. set of axioms, F-set of functions and A- Axioms in
which only what is to be done is mentioned but how is to be done is not mentioned.Thus ADT is not
concerned with implementation details.
6. List out the areas in which data structures are applied extensively.
Following are the areas in which data structures are applied extensively.
• Operating system - the data structures like priority queues are used for schedulingthe jobs in
the operating system.
• Compiler design - the tree data structure is used in parsing the source program.Stack data
structure is used in handling recursive calls.
AD3251_DSD_R2021
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
4931_Grace College of Engineering, Thoothukudi
www.BrainKart.com
• Database management system - The file data structure is used in database management
systems. Sorting and searching techniques can be applied on thesedata in the file.
• Numerical analysis package - the array is used to perform the numerical analysison the
given set of data.
• Graphics - the array and the linked list are useful in graphics applications.
• Artificial intelligence - the graph and trees are used for the applications like building
expression trees, game playing.
AD3251_DSD_R2021
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
4931_Grace College of Engineering, Thoothukudi
www.BrainKart.com
10. Write down the steps to modify a node in linked lists.
• Enter the position of the node which is to be modified.
• Enter the new value for the node to be modified.
• Search the corresponding node in the linked list.
• Replace the original value of that node by a new value.
• Display the messages as “The node is modified”.
12. State the properties of LIST abstract data type with suitable example.
Various properties of LIST abstract data type are
• It is linear data structure in which the elements are arranged adjacent to each other.
• It allows to store single variable polynomial.
• If the LIST is implemented using dynamic memory then it is called linked list. Exampleof
LIST are- stacks, queues, linked list.
13. State the advantages of circular lists over doubly linked list.
In circular list the next pointer of last node points to head node, whereas in doubly linked list
each node has two pointers: one previous pointer and another is next pointer. The main advantage of
circular list over doubly linked list is that with the help of single pointer fieldwe can access head node
quickly. Hence some amount of memory get saved because in circular list only one pointer is reserved.
14. What are the advantages of doubly linked list over singly linked list?
The doubly linked list has two pointer fields. One field is previous link field and anotheris next
link field. Because of these two pointer fields we can access any node efficiently whereas in singly
linked list only one pointer field is there which stores forward pointer.
A2 A3
A1
AD3251_DSD_R2021
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
4931_Grace College of Engineering, Thoothukudi
www.BrainKart.com
18. What is the basic purpose of header of the linked list?
The header node is the very first node of the linked list. Sometimes a dummy value such - 999
is stored in the data field of header node.
AD3251_DSD_R2021
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
4931_Grace College of Engineering, Thoothukudi
www.BrainKart.com
Dequeue(Q) – Deletes a element from the Queue.
ISEMTPTY(Q) – returns true if Queue is empty else false.
ISFULL(Q) - returns true if Queue is full else false.
28. Write down the function to insert an element into a queue, in which the queue is
implemented as an array.
void enqueue (int X, Queue Q)
{
if(IsFull(Q))
Error (“Full queue”);
else
{
Q->Size++;
Q->Rear = Q->Rear+1;
Q->Array[ Q->Rear ]=X;
}
}
PART -B
AD3251_DSD_R2021
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
All 2nd Semester Subjects
Professional English - II - HS3252 Engineering Graphics - GE3251
Statistics and Numerical Methods - Physics for Electronics Engineering -
MA3251 PH3254
Physics for Electrical Engineering - Physics for Civil Engineering - PH3201
PH3202
Materials Science - PH3251 Basic Electrical and Electronics
Engineering - BE3251
Physics for Information Science - Basic Civil and Mechanical Engineering -
PH3256 BE3255
Basic Electrical and Instrumentation Electric Circuit Analysis (Circuit
Engineering - BE3254 Theory) - EE3251
Programming in C - CS3251 Circuit Analysis - EC3251
Data Structures Design - AD3251