Computer Science Question

  • Reading: Data Structures and Algorithm Using C++
    • Chapter 10 Searching and Sorting

Tasks:

  1. Implement the Quicksort algorithm.
  2. Implement the Mergesort algorithm.
  3. Write a main function to test both sorting algorithms with various types of input data (random, sorted, reverse-sorted).
  4. Compare the performance of Quicksort and Mergesort in terms of time complexity and space complexity.
  5. 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.

WRITE MY PAPER

Comments

Leave a Reply