lecture16

lecture16 - CS111: Intro to Computer Science Lecture 16...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
CS111: Slides for Prof. Steinberg ʼ s lecture 1 Lecture 16 CS111: Intro to Computer CS111: Intro to Computer Science Science Lecture 16 Sorting
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS111: Slides for Prof. Steinberg ʼ s lecture 2 Lecture 16 Review: sorting Review: sorting There are many sorting algorithms In 111 we cover three Insertion Selection (later) Merge
Background image of page 2
CS111: Slides for Prof. Steinberg ʼ s lecture 3 Lecture 16 Why teach all 3 Why teach all 3 Why not just the best? No one best: tradeoffs, eg time to write vs time to run Good examples of programs that use arrays Good examples of analysis of Asymptotic Complexity
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS111: Slides for Prof. Steinberg ʼ s lecture 4 Lecture 16 Programs that use arrays Programs that use arrays Often use different parts of one array for different things Eg for a partially filled array, part holds actual data, part is to use for more data if and when there is more to store Eg for in-place sorting, part of the array holds sorted numbers and part holds unsorted numbers Easiest if a “part of the array” is a set of consecutive indices Eg ”index 0 through 4”, not “indices 2, 3, 5, 8, and 9”
Background image of page 4
CS111: Slides for Prof. Steinberg ʼ s lecture 5 Lecture 16 Which consecutive region?
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 11/01/2011 for the course 198 111 at Rutgers.

Page1 / 16

lecture16 - CS111: Intro to Computer Science Lecture 16...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online