Given sequence 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, sort the sequence using
Fantastic news! We've Found the answer you've been seeking!
Question:
Given sequence 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, sort the sequence using the following algorithms, and illustrate the details of the execution of the algorithms:
a. (5 marks) merge-sort algorithm.
b. (8 marks) quick-sort algorithm. Choose a partitioning strategy you like to pick a pivot element from the sequence. Analyze how different portioning strategies may impact on the performance of the sorting algorithm.
Related Book For
Data Structures and Algorithm Analysis in Java
ISBN: 978-0132576277
3rd edition
Authors: Mark A. Weiss
Posted Date: