- Reading: Data Structures and Algorithm Using C++
- Chapter 10 Searching and Sorting
Tasks:
- Implement the Quicksort algorithm.
- Implement the Mergesort algorithm.
- Write a main function to test both sorting algorithms with various types of input data (random, sorted, reverse-sorted).
- Compare the performance of Quicksort and Mergesort in terms of time complexity and space complexity.
- Discuss scenarios where one sorting algorithm would be preferred over the other.
For this C++ assignment, submit a word document or PDF with screenshots of the working code snippets and the successful output of the program.
Leave a Reply
You must be logged in to post a comment.