{"id":8,"date":"2017-01-07T13:33:30","date_gmt":"2017-01-07T13:33:30","guid":{"rendered":"http:\/\/learnlearn.uk\/algorithms\/?page_id=8"},"modified":"2021-05-03T05:24:15","modified_gmt":"2021-05-03T05:24:15","slug":"sorting-algorithms-lesson-plan","status":"publish","type":"page","link":"https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/","title":{"rendered":"Sorting Algorithms"},"content":{"rendered":"<div class=\"responsive-tabs\">\n<h2 class=\"tabtitle\">Starter<\/h2>\n<div class=\"tabcontent\">\n\n<p>Have a go at this sorting game. How quickly can you sort all the letters just by clicking on letters to swap?<\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/scratch.mit.edu\/projects\/embed\/138967507\/?autostart=false\" width=\"800\" height=\"600\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n\n<\/div><h2 class=\"tabtitle\">Intro<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Sorting algorithms &#8211; Why do we need them?<\/h3>\n<div id=\"attachment_12\" style=\"width: 281px\" class=\"wp-caption alignright\"><img aria-describedby=\"caption-attachment-12\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-12 size-medium\" src=\"https:\/\/learnlearn.uk\/algorithms\/wp-content\/uploads\/sites\/12\/2017\/01\/sort-271x300.png?_t=1619331074\" alt=\"sort\" width=\"271\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/algorithms\/wp-content\/uploads\/sites\/12\/2017\/01\/sort-271x300.png 271w, https:\/\/learnlearn.uk\/algorithms\/wp-content\/uploads\/sites\/12\/2017\/01\/sort.png 307w\" sizes=\"(max-width: 271px) 100vw, 271px\" \/><p id=\"caption-attachment-12\" class=\"wp-caption-text\">Sorting Algorithms have many uses Computing<\/p><\/div>\n<p>One of the most important jobs a computer performs for us is sorting of data. Without sorted data our computer systems would be much harder to use.<\/p>\n<p>Imagine:<\/p>\n<ul>\n<li>trying to read through all your emails if they were in a random date order.<\/li>\n<li>finding\u00a0a friend&#8217;s telephone number if all you contacts were in a random order.<\/li>\n<li>loading an app from your apps list if they were all jumbled up.<\/li>\n<\/ul>\n<p>There are many different ordering systems we can use, common ones include:<\/p>\n<ul>\n<li>alphabetical order<\/li>\n<li>numerical order<\/li>\n<li>date order<\/li>\n<li>size order<\/li>\n<\/ul>\n<p><strong>Different sorting algorithms<\/strong><\/p>\n<p>There are many different algorithms(methods) for sorting \u00a0lists of things. In the last task some people will have sorted the letters the fastest (most time efficient) or with the least number of swap (most effort efficient). Have a chat with the person next to about how they sorted out the list. What technique did they use? Whose algorithm was the most time \/ effort efficient?<\/p>\n<p>In computer science we have many different sorting techniques, some are most efficient than others, some are simpler than others. Today we will be looking at:<\/p>\n<ul>\n<li>Insertion Sort<\/li>\n<li>Bubble Sort<\/li>\n<li>Selection Sort<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Insertion Sort<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Insertion Sort<\/h3>\n<p>With the insertion sort algorithm, you go through each item in the list in turn and move to its correct position in the list. The algorithm is slow but simple.<\/p>\n<p><a href=\"https:\/\/drive.google.com\/file\/d\/0B4M7J3ubGpimNlZBMGFnRFNNUzA\/preview\" target=\"_blank\" rel=\"noopener\">Can&#8217;t access YouTube? Click here for the Google Drive Version<\/a><\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/KbDt5NafXaU\" width=\"800\" height=\"600\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Bubble Sort<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Bubble Sort<\/h3>\n<p>With bubble sort, you go through the list, comparing pairs of items and swapping them if necessary. This algorithm is very slow because you have to keep traversing the list many times.<\/p>\n<p><a href=\"https:\/\/drive.google.com\/file\/d\/0B4M7J3ubGpimcmt2ejBmaXZSaUk\/preview\" target=\"_blank\" rel=\"noopener\">Can&#8217;t access YouTube? Click here for the Google Drive Version<\/a><br \/>\n<iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/ubkfcecwmBo\" width=\"800\" height=\"600\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n\n<\/div><h2 class=\"tabtitle\">Selection Sort<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Selection\u00a0Sort<\/h3>\n<p>With selection sort, you look through the list, find the smallest item, and then move that item to a new list. You keep going until the original list is empty. This method is very slow as you have keep traversing the list to find the smallest item.<\/p>\n<p><a href=\"https:\/\/drive.google.com\/file\/d\/0B4M7J3ubGpimUW9EWjhGeXJVVms\/preview\" target=\"_blank\" rel=\"noopener\">Can&#8217;t access YouTube? Click here for the Google Drive Version<\/a><br \/>\n<iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/FXpd4R8ZWqk\" width=\"800\" height=\"600\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n\n<\/div><h2 class=\"tabtitle\">Activity 1<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Activity 1 &#8211; People Sorter<\/h3>\n<p>Replicate the class activity for each sorting algorithm (this can be done after introducing each sorting algorithm.<\/p>\n<p>Best splitting the class in to groups of 15 or less (otherwise the sorting will take a rather long time!<\/p>\n<p>Alternative Activity &#8211; Have a go at sorting letters using the scratch game below<\/p>\n<a href='https:\/\/scratch.mit.edu\/projects\/138977648\/#fullscreen' class='arconix-button arconix-button-medium arconix-button-gray' target=\"_blank\" >Scratch Practise<\/a>\n\n<\/div><h2 class=\"tabtitle\">Activity 2<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Activity 2 &#8211; Complete your learning log<\/h3>\n<p>Fill out your learning log for today&#8217;s lesson. (see lesson one for information)<\/p>\n\n<\/div><h2 class=\"tabtitle\">Resources<\/h2>\n<div class=\"tabcontent\">\n\n<p><a href=\"https:\/\/docs.google.com\/document\/d\/1H_QuSpxFn-s3IDwdy4UIsiEWz6Fep1cRHmaisAtjZNs\/edit?usp=sharing\">Lesson Plan &#8211; Unplugged Version<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Have a go at this sorting game. How quickly can you sort all the letters just by clicking on letters to swap? Sorting algorithms &#8211; Why do we need them? One of the most important jobs a computer performs for us is sorting of data. Without sorted data our computer systems would be much harder&hellip;&nbsp;<a href=\"https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Sorting Algorithms<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"on","neve_meta_content_width":85,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Sorting Algorithms - Algorithms<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Sorting Algorithms - Algorithms\" \/>\n<meta property=\"og:description\" content=\"Have a go at this sorting game. How quickly can you sort all the letters just by clicking on letters to swap? Sorting algorithms &#8211; Why do we need them? One of the most important jobs a computer performs for us is sorting of data. Without sorted data our computer systems would be much harder&hellip;&nbsp;Read More &raquo;Sorting Algorithms\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/\" \/>\n<meta property=\"og:site_name\" content=\"Algorithms\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-03T05:24:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/learnlearn.uk\/algorithms\/wp-content\/uploads\/sites\/12\/2017\/01\/sort-271x300.png?_t=1619331074\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/\",\"url\":\"https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/\",\"name\":\"Sorting Algorithms - Algorithms\",\"isPartOf\":{\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/#website\"},\"datePublished\":\"2017-01-07T13:33:30+00:00\",\"dateModified\":\"2021-05-03T05:24:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"KS3 Algorithms Unit\",\"item\":\"https:\/\/learnlearn.uk\/algorithms\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sorting Algorithms\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/#website\",\"url\":\"https:\/\/learnlearn.uk\/algorithms\/\",\"name\":\"Algorithms\",\"description\":\"An intro\",\"publisher\":{\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learnlearn.uk\/algorithms\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/#organization\",\"name\":\"Algorithms\",\"url\":\"https:\/\/learnlearn.uk\/algorithms\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/learnlearn.uk\/algorithms\/wp-content\/uploads\/sites\/12\/2021\/04\/LearnLearnLogowhite.png\",\"contentUrl\":\"https:\/\/learnlearn.uk\/algorithms\/wp-content\/uploads\/sites\/12\/2021\/04\/LearnLearnLogowhite.png\",\"width\":710,\"height\":98,\"caption\":\"Algorithms\"},\"image\":{\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Sorting Algorithms - Algorithms","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/","og_locale":"en_GB","og_type":"article","og_title":"Sorting Algorithms - Algorithms","og_description":"Have a go at this sorting game. How quickly can you sort all the letters just by clicking on letters to swap? Sorting algorithms &#8211; Why do we need them? One of the most important jobs a computer performs for us is sorting of data. Without sorted data our computer systems would be much harder&hellip;&nbsp;Read More &raquo;Sorting Algorithms","og_url":"https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/","og_site_name":"Algorithms","article_modified_time":"2021-05-03T05:24:15+00:00","og_image":[{"url":"https:\/\/learnlearn.uk\/algorithms\/wp-content\/uploads\/sites\/12\/2017\/01\/sort-271x300.png?_t=1619331074"}],"twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/","url":"https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/","name":"Sorting Algorithms - Algorithms","isPartOf":{"@id":"https:\/\/learnlearn.uk\/algorithms\/#website"},"datePublished":"2017-01-07T13:33:30+00:00","dateModified":"2021-05-03T05:24:15+00:00","breadcrumb":{"@id":"https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learnlearn.uk\/algorithms\/sorting-algorithms-lesson-plan\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"KS3 Algorithms Unit","item":"https:\/\/learnlearn.uk\/algorithms\/"},{"@type":"ListItem","position":2,"name":"Sorting Algorithms"}]},{"@type":"WebSite","@id":"https:\/\/learnlearn.uk\/algorithms\/#website","url":"https:\/\/learnlearn.uk\/algorithms\/","name":"Algorithms","description":"An intro","publisher":{"@id":"https:\/\/learnlearn.uk\/algorithms\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnlearn.uk\/algorithms\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/learnlearn.uk\/algorithms\/#organization","name":"Algorithms","url":"https:\/\/learnlearn.uk\/algorithms\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/learnlearn.uk\/algorithms\/#\/schema\/logo\/image\/","url":"https:\/\/learnlearn.uk\/algorithms\/wp-content\/uploads\/sites\/12\/2021\/04\/LearnLearnLogowhite.png","contentUrl":"https:\/\/learnlearn.uk\/algorithms\/wp-content\/uploads\/sites\/12\/2021\/04\/LearnLearnLogowhite.png","width":710,"height":98,"caption":"Algorithms"},"image":{"@id":"https:\/\/learnlearn.uk\/algorithms\/#\/schema\/logo\/image\/"}}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"learnlearnadmin","author_link":"https:\/\/learnlearn.uk\/algorithms\/author\/learnlearnadmin\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":"Have a go at this sorting game. How quickly can you sort all the letters just by clicking on letters to swap? Sorting algorithms &#8211; Why do we need them? One of the most important jobs a computer performs for us is sorting of data. Without sorted data our computer systems would be much harder&hellip;&nbsp;Read&hellip;","_links":{"self":[{"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/pages\/8"}],"collection":[{"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":6,"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/pages\/8\/revisions"}],"predecessor-version":[{"id":180,"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/pages\/8\/revisions\/180"}],"wp:attachment":[{"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/media?parent=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}