General Computer Science for Engineers CISC 106 James Atlas Computer and Information Sciences 10/21/2009
Objectives Overview of Sorting Algorithms Understand Selection Sort
Why do we sort data?
How do we sort data?
Algorithm for sorting (Selection Sort) 1. Find the minimum data in the set 2. Swap it with the first element of the set 3. Repeat Steps 1-2 for the remaining elements
Running Time (Selection Sort) loop progress
Structures student.name = ‘Frank’ student.birthday = 22 disp(student) student = struct(‘name’,’Frank’,’birthday’,22)
Project 1 A system of bouncing circles (simulation) Part 1 - elastic collision with a wall Teams people (smaller is better) ◦ Librarian ◦ Recorder ◦ Team Leader ◦ Name! Need team participants by Friday