A Prove That 7 Comparisons Are Required To Sort 5

a. Prove that 7 comparisons are required to sort 5 elements using any comparison based algorithm.
b. Give an algorithm to sort 5 elements with 7 comparisons.

Posted in Uncategorized