Reflections of ADS2 2011. “There has never been a better time to teach Computer Science” Patrick Prosser 2011.

Slides:



Advertisements
Similar presentations
Garfield AP Computer Science
Advertisements

Lecture 12: Revision Lecture Dr John Levine Algorithms and Complexity March 27th 2006.
Review. What to know You are responsible for all material covered in lecture, the readings, or the programming assignments There will also be some questions.
CSE332: Data Abstractions Lecture 12: Introduction to Sorting Tyler Robison Summer
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Data Structures & Algorithms What The Course Is About s Data structures is concerned with the representation and manipulation of data. s All programs.
CS 280 Data Structures Professor John Peterson. Invariants Back to Invariants! Recall the insertion sort invariant – how can we turn this into debugging.
Course Overview CS221 – Advanced Programming Fall 2007 : Ray S. Babcock Computer Science Department Montana State University.
Midterm Exam Two Tuesday, November 25 st In class cumulative.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Insertion Sort & Shellsort By: Andy Le CS146 – Dr. Sin Min Lee Spring 2004.
HORSEED International University
Data Structure & Algorithm Lecture 3 –Algorithm Analysis JJCAO.
Algorithmically Adversarial Input Design “Making Mathematical Reasoning Fun” Workshop ACM SIGCSE, 2013 Brian C. Dean, Chad Waters School of Computing,
-What works for me….. Be more efficient Engage your students Teach concepts in new ways Make those old lessons fun and new by adding tech We live in a.
Fall 2013 Instructor: Reza Entezari-Maleki Sharif University of Technology 1 Fundamentals of Programming Session 17 These.
Instructor: Dr. Sahar Shabanah Fall Lectures ST, 9:30 pm-11:00 pm Text book: M. T. Goodrich and R. Tamassia, “Data Structures and Algorithms in.
© 2004 Goodrich, Tamassia CS2210 Data Structures and Algorithms Lecture 1: Course Overview Instructor: Olga Veksler.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 23 Algorithm Efficiency.
Starter: Discussion circle Work in table groups 12 piece circular puzzle.
Recursion, Complexity, and Searching and Sorting By Andrew Zeng.
1 CS 233 Data Structures and Algorithms 황승원 Fall 2010 CSE, POSTECH.
UNIT 18 Searching and Sorting.
Lecture 10: Class Review Dr John Levine Algorithms and Complexity March 13th 2006.
Java Collections An Introduction to Abstract Data Types, Data Structures, and Algorithms David A Watt and Deryck F Brown © 2001, D.A. Watt and D.F. Brown.
Algorithms and Data Structures TEACH THAT Lassie, what’s in this ADS2 course ? Will it be interesting? woof!
CS212: DATA STRUCTURES Lecture 1: Introduction. What is this course is about ?  Data structures : conceptual and concrete ways to organize data for efficient.
CSE 373 Data Structures and Algorithms
1 Introduction to Data Structures. 2 Course Name : Data Structure (CSI 221) Course Teacher : Md. Zakir Hossain Lecturer, Dept. of Computer Science Stamford.
1. Introduction Adaptive hypermedia & AHyCo Algorithms and Data Structures course materials in AHyCo Knowledge assessment with AHyCo Conclusion and further.
Algorithms and Data Structures TEACH THAT Algorithms and Data Structures An algorithm does something, solves some problem, in a mechanical way. It is.
Review for Final Andy Wang Data Structures, Algorithms, and Generic Programming.
L Please get a complete set (brown, green, red and yellow) of colored paper from the front.
1 Week 9 A little more GUI, and threads. Objectives: Discuss the Swing set of classes. Incorporate animation into applets. Define the term thread. Explain.
Data Structures for Programmers Vamshi Ambati
Review and Prepare for Test 3 CS 244 Brent M. Dingle, Ph.D. Game Design and Development Program Department of Mathematics, Statistics, and Computer Science.
Sorting – Insertion and Selection. Sorting Arranging data into ascending or descending order Influences the speed and complexity of algorithms that use.
2011-T2 Lecture 21 School of Engineering and Computer Science, Victoria University of Wellington  Marcus Frean, Lindsay Groves, and Peter Andreae, VUW.
Starter: Discussion circle Work in table groups 12 piece circular puzzle.
Teacher Talk There has never been a better time to teach Computer Science 2.We can learn from Chemistry, Physics, Biology, …
Final Exam Tuesday, December 22nd 2:00 - 3:50pm room 102 Warren Weaver Hall.
Sorting and Searching by Dr P.Padmanabham Professor (CSE)&Director
Lecture 8 : Priority Queue Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University.
Quick sort, lower bound on sorting, bucket sort, radix sort, comparison of algorithms, code, … Sorting: part 2.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 23 Algorithm Efficiency.
1Computer Sciences. 2 HEAP SORT TUTORIAL 4 Objective O(n lg n) worst case like merge sort. Sorts in place like insertion sort. A heap can be stored as.
CSE332: Data Abstractions Lecture 12: Introduction to Sorting Dan Grossman Spring 2010.
Course Info Instructor U.T. Nguyen Office: CSEB Office hours: Tuesday, 14:30-15:30 Thursday, 12:00-12:45 By.
Data Structures and Algorithms in Java AlaaEddin 2012.
Computer Science 1620 Sorting. cases exist where we would like our data to be in ascending (descending order) binary searching printing purposes selection.
Starter: Discussion circle Work in table groups 12 piece circular puzzle.
BITS Pilani Pilani Campus Data Structure and Algorithms Design Dr. Maheswari Karthikeyan Lecture1.
Data Structures, Algorithms, & Applications
CS16: Introduction to Algorithms and Data Structures
CS1010 Programming Methodology
Growth of Functions & Algorithms
ADS2 Schedule 2017.
Exam Hints.
CS1010 Programming Methodology
Lesson Objectives Aims Understand the following “standard algorithms”:
Teach A level Computing: Algorithms and Data Structures
Welcome to IT 516! Data Structures & Algorithms Review of Linked Lists Parallel ordered arrays Binary Search Trees Tom Becker Summerr 2018 Lecture 7.
ECET 370 HELPS Education Your Life-- ecet370helps.com.
CS302 Data Structures Fall 2012.
2008/12/03: Lecture 20 CMSC 104, Section 0101 John Y. Park
در اين درس مباني ساختمان داده ها و الگوريتم ها تدریس میشود.
IT 4043 Data Structures and Algorithms
Review and Prepare for Test 2
Algorithms and Data Structures
Sorting: part 1 Barak Obama on sorting, bubble sort, insertion sort,
Presentation transcript:

Reflections of ADS2 2011

“There has never been a better time to teach Computer Science” Patrick Prosser 2011

Course home page

course content

Course content

Aims & Objectives

Aims and objectives -Learn about algorithms and data structures in java (surprised?) -Implement algorithms and data structures -Apply algorithms and data structures

Ulterior motives -To be scientific -To be an engineer -To be a mechanic -To appreciate beauty -neat, tidy, small, simple, efficient, fast, … -To think critically -Costs and benefits -To do experiments (wherever possible) -Use big data sets (where possible) -“Teach yourself programming in 10 years” -To have fun

We are always learning

exercises

5 exercises, 2 are assessed, plus a zero exercise and a challenge

exercises… for instance In 2 parts, implement a circular queue then use this to implement a sorting algorithm. Readme files, slides, hints and tips, code stubs to get started. There is a Test program (always is), a marking program (compiled), and data sets Marking program is just a part of final mark

exercises… for instance 1 st part of the exercise, code stub

exercises… for instance 1 st part of the exercise, code stub

Experiments in the Lecture

Experiments on the bench (in lecture) -The effect of the wrong data structure -Using the IMDB data sets at Robert Sedgewick’s

Experiments on the bench (in lecture) -The effect of the wrong data structure -Using the IMDB data sets at Robert Sedgewick’s

Experiments on the bench (in lecture) -The effect of the wrong data structure -Using the IMDB data sets at Robert Sedgewick’s Not a small effort … for only a part of a lecture!

Experiments on the bench (in lecture) On Recursion A small effort … for a part of a lecture Perm, power set, H-tree, binary tree, …

Experiments on the bench (in lecture) The growth of functions Part of a lecture: editing and running code, using gnuPlot in the class, going off-topic (i.e. general effect of exponential growth “what does 3% economic growth mean?”)

Experiments on the bench (in lecture) Binary search A demo that shows how search proceeds Using unixWords (about 400,000 words) A small effort … for a very small part of a lecture!

Experiments on the bench (in lecture) Is Big-Oh all there is to it? A considerable effort … for only part of a lecture

Experiments on the bench (in lecture) Binary Search Trees v AVL Trees Hashing (different functions) Etc …

The students have lapTops

lapTops in the lectures

Now that we have won the lottery, what shall we do about the begging letters? lapTops in the lectures

We shall keep sending them lapTops in the lectures

What should we do with student lapTops in the lecture theatre?

The lecture theatre

Boyd Orr Lecture Theatre 2

-3 screens with 3 data projectors -3 vizualisers -Internet connected pc -Desk top lapTop connection -Lectern/desk that goes up and down -Sound system -On the ground floor, near to toilets, hopping distance from SAWB

Boyd Orr Lecture Theatre 2 I love BO2

Boyd Orr Lecture Theatre 2 I love the smell of Napalm in the morning ….

Boyd Orr Lecture Theatre 2 I love the visualizers … -To use instead of a black/white board -To put things underneath (such as bits of paper) -… or lego -….or stuff I use all of BO2

We videoed all the lectures … and what happened?

We videoed all the lectures Attendance fell (but hey, Stanford ended up with 20 physical students) 40% < 40%

attendance Swipe that!

What about the students?

-Mostly good -Surprising number are excellent -Thanks to 1 st year and 1 st semester

The End and yes it was all my own work

… just me, and these people Alice Miller David Manlove David Watt Tom Kelly Geoffrey Ciaran Jeremy Singer Paul Cockshott David Andrew Andy Brooks Rob Irving Gethin Norman Gail Reat Karen Renaud Peter Nightingale Andrea & Zoe Stewart McNeil …

“This is the best time to teach CS”

An example, using sorting

Sorting, what’s that then? Given a collection of data, get it into order …

Sorting, what’s that then? Given a collection of data, get it into order … This is NOT in order

Sorting, what’s that then? Given a collection of data, get it into order … This is IS in order

Sorting, what’s that then? Given a collection of data, get it into order … This is IS in order It’s in ascending order

Sorting, what’s that then? Sorting is the process of going from this to that

Sorting, why bother? Who cares? You can find things quicker!

Sorting, why bother? Who cares? You can find things quicker! Use “binary search” (or even linear search and stop early)

Some algorithms for sorting bubble sort insertion sort selection sort shell sort gnome sort merge sort quick sort heap sort radix sort bead sort sorting

Some algorithms for sorting bubble sort insertion sort selection sort shell sort gnome sort merge sort quick sort heap sort radix sort bead sort sorting quadratic

Some algorithms for sorting bubble sort insertion sort selection sort shell sort gnome sort merge sort quick sort heap sort radix sort bead sort sorting logarithmic

Some algorithms for sorting bubble sort insertion sort selection sort shell sort gnome sort merge sort quick sort heap sort radix sort bead sort sorting linear

Some algorithms for sorting bubble sort insertion sort selection sort shell sort gnome sort merge sort quick sort heap sort radix sort bead sort sorting Our example

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example Are you tired yet? Bored?

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example Phew!

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort On an Array

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example i=8

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare i=8 j=0

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap Example i=8 j=0

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=8 j=1

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap Example i=8 j=1

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=8 j=2

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap Example i=8 j=2

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=8 j=3

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap Example i=8 j=3

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=8 j=4

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap Example i=8 j=4

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=8 j=5

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap Example i=8 j=5

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=8j=6

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap Example i=8j=6

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=8j=7

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap Example i=8j=7

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example sorting Example

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare sorting Example i=7 j=0

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=7 j=1

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap Example i=7 j=1

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=7 j=2

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap sorting Example i=7 j=2

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare sorting Example i=7 j=3

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap sorting Example i=7 j=3

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare sorting Example i=7 j=4

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap sorting Example i=7 j=4

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare sorting Example i=7j=5

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare sorting Example i=7j=6

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap sorting Example i=7j=6

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare sorting Example i=6j=0

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap Example i=6j=0

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=6j=1

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=6j=2

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap Example i=6j=2

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=6j=3

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap Example i=6j=3

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=6j=4

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=6j=5

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap Example i=6j=5

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=5j=0

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=5j=1

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=5j=2

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example swap Example i=5j=2

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=5j=3

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=5j=4

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=4j=0

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=4j=1

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=4j=2

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example compare Example i=4j=3

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort Example Phew!

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort On an Array Can we visualize this?

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort On an Array Can we visualize this? Assume we have a random list of numbers from 0 to n-1, put in an array A Such that A[0] is the 1 st number and A[n-1] is the last

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort On an Array Can we visualize this? Assume we have a random list of numbers from 0 to n-1, put in an array A Such that A[0] is the 1 st number and A[n-1] is the last

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort On an Array Can we visualize this? Assume we have a random list of numbers from 0 to n-1, put in an array A Such that A[0] is the 1 st number and A[n-1] is the last A[0] A[1] A[2] A[3] A[4] A[5] A[6] A[7] A[8]

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort On an Array Can we visualize this? Assume we have a random list of numbers from 0 to n-1, put in an array A Such that A[0] is the 1 st number and A[n-1] is the last A[0] A[1] A[2] A[3] A[4] A[5] A[6] A[7] A[8] We could plot A[i] on a graph as a point with x/y coordinates i/A[i]

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort On an Array Can we visualize this? Assume we have a random list of numbers from 0 to n-1, put in an array A Such that A[0] is the 1 st number and A[n-1] is the last A[0] A[1] A[2] A[3] A[4] A[5] A[6] A[7] A[8] We could plot A[i] on a graph as a point with x/y coordinates i/A[i] Do this as the algorithm progress to see how it progresses.

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort On an Array Can we visualize this? Assume we have a random list of numbers from 0 to n-1, put in an array A Such that A[0] is the 1 st number and A[n-1] is the last A[0] A[1] A[2] A[3] A[4] A[5] A[6] A[7] A[8] We could plot A[i] on a graph as a point with x/y coordinates i/A[i] Do this as the algorithm progress to see how it progresses. Ready?

Quadratic algorithms bubble sort insertion sort selection sort sorting Bubble Sort On an Array

sorting Bubble Sort Show me more!

sorting Bubble Sort Show me more! different sorting algorithms and relative performance a beauty contest what is the “sound” of sorting? can you show me it by mime? Expressive dance?

sorting Bubble Sort NOTE to self: Bubble sort is a quadratic time algorithm. If I have to sort a data set of N objects the run time will be proportional to N 2

sorting Bubble Sort NOTE to self: Bubble sort is a quadratic time algorithm. If I have to sort a data set of N objects the run time will be proportional to N 2 To sort 10 numbers will take 100 units of time

sorting Bubble Sort NOTE to self: Bubble sort is a quadratic time algorithm. If I have to sort a data set of N objects the run time will be proportional to N 2 To sort 10 numbers will take 100 units of time To sort 100 numbers will take 10,000 units of time

sorting Bubble Sort NOTE to self: Bubble sort is a quadratic time algorithm. If I have to sort a data set of N objects the run time will be proportional to N 2 To sort 10 numbers will take 100 units of time To sort 100 numbers will take 10,000 units of time To sort 1000 numbers will take 1,000,000 units of time

Links sorting algorithm animation sound of sorting (part 1) sound of sorting (part 2) bubble sort by folk dancing

Barak on Sorting

I think there has never been a better time to teach Computer Science end of part 1

Live dangerously … live like a teacher, like a Physics teacher, or Chemistry, or Biology, or …

Live dangerously