B2.4 Programming algorithmsB2.4.3
Bubble Sort and Selection Sort
Construct and trace algorithms to implement bubble sort and selection sort, evaluating their time and space complexities
SL + HL≈ 65 minCommand term: ConstructPremium
In this lesson
- Constructing bubble sort and selection sort in Java and Python
- Tracing both sorts pass by pass
- Stating their time and space complexities
- Evaluating which sort suits different data sets
This lesson is part of Premium
Every topic has one free lesson. Premium unlocks every interactive lesson, the exam-style questions at the end of each one, and the rest of Praxis IB.
What's inside
- LearnTwo simple sorts
- CodeBubble sort
- CodeSelection sort
- LabSort step by step
- CheckTrace a bubble sort
- CodeStopping early
- LearnTime and space complexity
- CheckWhich sort?
- CheckQuick check
- ExamWorked exam answer
- ReviewMistakes examiners see
- Exam practiceExam-style questions
Ends with 4 exam-style questions worth 17 marks, with a self-marking markscheme.