5.
$$90,50,55,40,20,35,30,25,45$$
- Use the bubble sort algorithm to sort the list of numbers above into descending order showing the rearranged order after each pass.
Jessica wants to record a number of television programmes onto video tapes. Each tape is 2 hours long. The lengths, in minutes, of the programmes she wishes to record are:
$$\text { 55, 45, 20, 30, 30, 40, 20, 90, 25, 50, } 35 \text { and } 35 .$$
- Find the total length of programmes to be recorded and hence determine a lower bound for the number of tapes required.
- Use the first fit decreasing algorithm to fit the programmes onto her 2-hour tapes.
Jessica's friend Amy says she can fit all the programmes onto 4 tapes.
- Show how this is possible.