Website address
DSH logo
LGS details
You are here:
Home > Key Stage 3 (Ages 11 - 14) > Sorting Algorithms
Sorting Algorithms
  • Have you ever created a game in Scratch where the player can collect points?
  • If no, then click here  to learn how to create a score board list in Scratch using your variable called points.
  • If your answer was yes, you will have noticed that you are unable to reorder the values in the list from highest to lowest or vice versa. This is the hook for many pupils who will want to be able to do this!
  • Would you like to learn how?  If so, read on...

If you have done the learning below but still need help with using a sorting algorithm in a game then please click here...

To download all the lesson resources, please scroll to the bottom of this page to download the presentation. 

1) First we have to create a data set with random values for your algorithms to sort. 

Video tutorial:


Image tutorial: 

2) Now we can develop our first sorting algorithm, the Bubble Sort. 

From experience of DSH teacher it is best to get the pupils spotting the pattern/rule by using a pack of playing cards... pupils use the playing cards to mirror the dancers by moving the cards. Then when they have got the hang of how the sorting algorithm works - get the pupils to put the cards in a random order nd then test their understanding. Only when pupils have grasped the concepts, should the teacher support the pupils to produce a flow diagram!

Video tutorial: 

Image tutorial:

3) Our second algorithm works differently to the Bubble Sort, this is called a Insertion Sort. 

Do the same in this video as you did the last video but scaffold the learning less because from the experience of the DSH the pupils find it easier the second time. 

Video tutorial:

Image tutorial: 

4) Some sorting algorithms combine both techiques that we have learnt so far. However, before we can develop such an algorithm we need to create a second data set of random values. 

Video tutorial:

Image tutorial: 

5) Now that we have two data sets to merge we can begin creating the Merge Sort Algorithm in Scartch. 

** Note: The hook for this activity is encouraging pupils to think about how their games consoles for the favourite computer game produces a single list of top players in the UK and globally... 

Do the same with the above videos. 

Video tutorial: 

Image tutorial:

 
Recently viewed...
 
Downloads
CPD sessions
Bookings

Latest resources news

App Shed: Mobile phone app (Maths quiz)

If you would like to make the App Shed math quiz but need to scaffold the learning of your...
Read more...

Secret messages using steganography

Have you ever heard of Steganography? If you havent then you will think that this is really...
Read more...

Robot Maze meets Pac Man!

This set of short videos have been created at the request of teachers in the Slough (United...
Read more...

Using Sorting Algorithm on Highest Scoreboard

If you think that your students would like this lesson but need the basics of understanding a...
Read more...

How to chase Pac Man

If you enjoyed this lesson, why not learn how to create the full game click here.If you want to...
Read more...

Sorting Algorithms

Have you ever created a game in Scratch where the player can collect points? If no, then click...
Read more...

Mathematical extension: Top trumps

We were recommended this maths investigation to complement (and provide an extension for) the...
Read more...

Word association to teach Computer Science vocab

Word association games are great for teaching Computer Science vocabulary because it helps them...
Read more...

Beautiful numbers: Recursive Fibonacci Series

The Fibonacci sequence is a series of numbers which appear throughout nature. This sequence can...
Read more...

Scratch: Maths quiz

This lesson is a variation of the highly popular number calcuator. We have created these...
Read more...

Scratch: Alternatives to Beebots & Probots

Following a request from a local primary school we have created a series of short videos for...
Read more...

Scratch: Teaching dance

This is a series of learning videos for using dance to teach Computer Science. We have used the...
Read more...

Why use us?
Resources
Post lesson login



Contact details

dsh@lgs.slough.sch.uk

+44 (0) 1753-598-350

Reddington Drive Langley Berkshire SL3 7QS United Kingdom

Created by Mark Dorling Copyright © 2012 The Digital Schoolhouse. All rights reserved.