Problem
1. Consider the list of characters: [‘P',‘Y',‘T',‘H',‘O',‘N']. Show how this list is sorted using the following algorithms:
• bubble sort
• selection sort
• insertion sort
• shell sort (you decide on the increments)
• merge sort
• quick sort (you decide on the pivot value)
2. Devise alternative strategies for choosing the pivot value in quick sort. For example, pick the middle item. Re-implement the algorithm and then execute it on random data sets. Under what criteria does your new strategy perform better or worse than the strategy from this chapter?