Description:
In this assignment you will write a C++ program that finds the kth largest number among a set of N numbers. It will implement the solution using two different algorithms and measure the time elapsed during the execution of these algorithms. The design of the program will follow the Strategy Pattern [1] to be able to switch algorithms at runtime. As input, the program will take the type of algorithm to be applied (1 or 2), k (a number less than or equal to N). Then it will take N followed by a list of N numbers. As output, it will print out the kth largest number and the total elapsed time for the completion of the algorithm.
References -
Strategy Pattern, https://en.wikipedia.org/wiki/Strategy_pattern, [online] accessed 2014.
Attachment:- Assignment.rar