0% found this document useful (0 votes)
3 views

Assignment 3

This assignment focuses on Data Structures and Algorithms, specifically on Big O Notation and algorithm efficiency. It includes questions on analyzing time complexity for various operations, comparing sorting algorithms, and discussing scenarios where algorithm efficiency impacts performance. Students are required to provide definitions, analyses, comparisons, and pseudocode for sorting algorithms.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Assignment 3

This assignment focuses on Data Structures and Algorithms, specifically on Big O Notation and algorithm efficiency. It includes questions on analyzing time complexity for various operations, comparing sorting algorithms, and discussing scenarios where algorithm efficiency impacts performance. Students are required to provide definitions, analyses, comparisons, and pseudocode for sorting algorithms.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

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.

You might also like