Prog. assignment 3
Prog. assignment 3
Objective
The objective of this assignment is to implement algorithms to find the minimum, max-
imum, k-th smallest element using Quickselect, and the median using the Median of
Medians algorithm. You’ll learn about efficient selection algorithms and their practical
applications.
Problem Statement
Problem Description
– Minima and Maxima: Implement functions to find the minimum and maxi-
mum of an array in O(n) time.
– Quickselect: Implement the Quickselect algorithm to find the k-th smallest
element in an array in expected O(n) time.
– Median of Medians: Implement the Median of Medians algorithm to find the
median of an array in O(n) worst-case time.
Note
You are expected to work individually on this assignment.
Plagiarism will not be tolerated. Any suspected plagiarism will result in penalties
as per the course policy.