Sorting and Searching

Steven J. Zeil

Old Dominion University, Dept. of Computer Science

Table of Contents

1. Ordered Insert: Inserting into a Sorted Array
1.1. Special Case Behavior
2. Insertion Sort
2.1. Getting Started
2.2. All for One
2.3. and One for All
3. Sequential Search
3.1. A Slightly Faster Variant for Sorted Arrays
4. Binary Search

This leson reviews some basic array sorting and searching techniques. You should actually already have encountered these in earlier classes, but we want to set up some code to work with later as we begin to study analysis of algorithms


In the Forum:

(no threads at this time)