Assignment 2 1
Assignment 2 1
Submission Instructions:
Timely submission is crucial. Assignments submitted after the deadline in Google Classroom will not
be accepted.
Submit assignments in handwritten format as PDF documents uploaded to Google Classroom.
All submitted work must be original and completed independently. Cheating in any form will result in
a score of zero without further justification or appeal.
Assignment-2
Question 1. Explain how a singly linked list data structure can represent a polynomial. Discuss the
advantages and disadvantages of using linked lists for polynomial representation
compared to other data structures.
Question 2. Explain the process of inserting a new node into a circular linked list. Discuss the
different scenarios based on the insertion position, such as inserting at the list's
beginning, middle, or end. Provide pseudocode or code snippets to illustrate the
insertion process for each scenario.
Question 3. Define an extended binary tree and explain its characteristics. Describe how an
extended binary tree differs from a standard binary tree, including the concept of
external nodes.
Question 4. Explain how trees can be represented using linked lists. Discuss different approaches,
such as using parent pointers or child pointers to link tree nodes together. Compare
and contrast linked list representation with array representation, highlighting the
differences in memory usage and traversal efficiency and how it differs from using
Array.
Question 5. Analyze the time complexity of binary search and justify why it is considered an
efficient search algorithm. Discuss how binary search achieves a time complexity of
O(log n) on average and in the best case, and explain the worst-case scenario where
binary search may not perform optimally.
Question 6. Discuss the key components of a hash table, including the array (or buckets) where
key-value pairs are stored, the hash function used to calculate indices, and collision
resolution techniques employed to handle situations where multiple keys map to the
same index.
Question 7. Define sorting and explain its significance in data structures and algorithms. Discuss
why sorting is a fundamental operation and how it facilitates efficient data searching,
retrieval, and manipulation.
Question 8. Analyze the time complexity of merge sort and justify why it achieves a time
complexity of O(n log n) in all cases (best case, average case, and worst case). Discuss
how the divide-and-conquer strategy and the merging process contribute to the
efficiency of the merge sort
Question 9. Describe the key properties of a minimum spanning tree, including connectivity,
acyclic nature, and minimality. Explain why a minimum spanning tree must form a
connected subgraph with no cycles and have the minimum total edge weight among
all possible spanning trees of the graph.
Question 10. Describe the adjacency matrix representation of a graph. Explain how an adjacency
matrix is used to represent the connectivity between vertices by storing a binary
matrix where each element indicates whether an edge exists between two vertices.
Q. No. 1 2 3 4 5 6 7 8 9 10
Unit
6 6 7 7 8 8 9 9 10 10
No.