It looks like quicksort has solved our performance problems. However, we should not be so hasty. In this video, we look at the real performance for quicksort, and why it is not perfect. We also talk…
The partition algorithm breaks up the list into two kind-of-sorted portions. In this video, we show how to use this fact with divide-and-conquer to implement a new sorting algorithm: quicksort. For…
In the previous video, we saw that nested loops are causing our sorting algorithms to be slow. To speed things up, we need to get rid of one of these loops. To do that, we will need a special…
Sometimes we need to perform a calculation on a string, list, or tuple, but we do not want to loop over this value. Instead, we want to loop over the positions of the value. In this video we show why…