Paper 2 - Sorting Algorithms

0.0(0)
Studied by 3 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/8

Last updated 9:36 AM on 3/13/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

9 Terms

1
New cards

How do you perform a bubble sort

  1. Look at the first two items in the list

  2. If they’re in the right order, don’t do anything. If they’re in the wrong order, swap them

  3. Move on to the next pair of items and repeat step 2

  4. Repeat step 3 until you get to the end of the list

  5. Repeat steps 1-4 until there are no swaps in a pass

2
New cards

what are the advantages of bubble sort

Its a simple algorithm than can be easily implemented on a computer

Its an efficient wat to check if a list is already in order

Doesn’t use very much memory as all the sorting is done using the original list

3
New cards

what are the disadvantages of bubble sort

its an inefficient way to sort a list

does not cope well with very large lists of items

4
New cards

How do you perform a merge sort

  1. split the list in half

  2. keep repeating step 2 until all lists only contain one item

  3. merge pairs of sub lists so that each sub lists has twice as many items. Each time you merge the sub-lists, sort the items into the right order

    1. repeat step 3 until all sub-lists are merged together

5
New cards

what are the benefits of merge sort

more efficient and quicker than bubble sort and insertion sort for large lists

has a very consistent running time regardless of how ordered the items in the original list are

6
New cards

what are the disadvantages of Merge sort

its slower than other algorithms for small lists

even if the lists is already sorted it still goes through the whole splitting and merging process

it uses more memory than the other sorting algorithms in order to create the separate lists

7
New cards

how do you perform an insertion sort

  1. look at the second item in the list

  2. compare it to all items before it and insert the number into the right place

    1. repeat steps 2 for all the items in the list so they are all sorted

8
New cards

what are the advantages of insertion sort

can be easily coded

copes very well with small lists

all sorting is done on the original list so it doesn’t require very much additional memory

very quick to add items to an already sorted list

very quick at checking a list that is already sorted

9
New cards

what is the main disadvantage of insertion sort

doesnt cope very well with very large lists

Explore top notes

note
1.1 Understanding Social Problems
Updated 1102d ago
0.0(0)
note
Chapter 29- Fungi
Updated 1177d ago
0.0(0)
note
Vitamins and Minerals
Updated 723d ago
0.0(0)
note
Training Session 6
Updated 498d ago
0.0(0)
note
Chemical Changes
Updated 1348d ago
0.0(0)
note
1.1 Understanding Social Problems
Updated 1102d ago
0.0(0)
note
Chapter 29- Fungi
Updated 1177d ago
0.0(0)
note
Vitamins and Minerals
Updated 723d ago
0.0(0)
note
Training Session 6
Updated 498d ago
0.0(0)
note
Chemical Changes
Updated 1348d ago
0.0(0)

Explore top flashcards

flashcards
Unit 7: Period 7: 1890–1945
47
Updated 73d ago
0.0(0)
flashcards
Muscles of the Face
31
Updated 1214d ago
0.0(0)
flashcards
Unit 0.All
29
Updated 940d ago
0.0(0)
flashcards
Unit 1.1
23
Updated 207d ago
0.0(0)
flashcards
7Atelier B und 8entree
74
Updated 1163d ago
0.0(0)
flashcards
AP Wrld- Vocab Unit 7
25
Updated 703d ago
0.0(0)
flashcards
AP Psych Unit 1 Biology Part 1
52
Updated 530d ago
0.0(0)
flashcards
Unit 7: Period 7: 1890–1945
47
Updated 73d ago
0.0(0)
flashcards
Muscles of the Face
31
Updated 1214d ago
0.0(0)
flashcards
Unit 0.All
29
Updated 940d ago
0.0(0)
flashcards
Unit 1.1
23
Updated 207d ago
0.0(0)
flashcards
7Atelier B und 8entree
74
Updated 1163d ago
0.0(0)
flashcards
AP Wrld- Vocab Unit 7
25
Updated 703d ago
0.0(0)
flashcards
AP Psych Unit 1 Biology Part 1
52
Updated 530d ago
0.0(0)