- I In Block 2 Part 6 You Saw That Selection Sort Requires About N 1 2 Comparisons To Sort A List Of Length N In Fac 1 (20.8 KiB) Viewed 19 times
i. In Block 2 Part 6, you saw that selection sort requires about (n-1)²/2 comparisons to sort a list of length n. In fac
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
i. In Block 2 Part 6, you saw that selection sort requires about (n-1)²/2 comparisons to sort a list of length n. In fac
i. In Block 2 Part 6, you saw that selection sort requires about (n-1)²/2 comparisons to sort a list of length n. In fact, the exact number of comparisons required by selection sort to sort a list of length n is nx (n-1)/ 2. Use this formula to calculate the total number of comparisons required to sort two lists each of length 100. ii. Once the two lists have been sorted, they need to be merged. Suggest a reason why the maximum number of comparisons required to merge two lists, each of length 100, is 199. iii. Hence, find the maximum total number of comparisons required to sort two lists of length 100 using Strategy B.