ASSIGNMENT 3
Course: Data Structures and Algorithms
Total Marks: 20
Time Allowed: 1.5 hours
Question 1: (10 Marks)
1. Algorithm efficiency is a key consideration in computer science, and Big O Notation
provides a framework to understand it. Define Big O Notation and explain its role in
analyzing algorithm efficiency.
2. Analyze the time complexity of the following operations in terms of Big O:
o Accessing an element in an array
o Inserting an element at the end of a singly linked list
o Enqueuing in a circular queue
o Inserting into a binary search tree
3. Describe a scenario where selecting a more efficient algorithm (in terms of Big O
Notation) could significantly impact a system’s performance. Provide a comparison
between a less efficient and a more efficient approach in your example.
Question 2: (10 Marks)
1. Sorting algorithms have different levels of efficiency and are chosen based on specific
requirements. Compare and contrast Bubble Sort, Quick Sort, and Merge Sort in terms of
time complexity, best use cases, and efficiency.
2. Describe a situation where using Merge Sort would be more advantageous than Quick
Sort. Explain your reasoning with reference to the characteristics of each algorithm.
3. Write pseudocode for Merge Sort and briefly explain each step.