Lecture9

# Lecture9 - IE 495 Lecture 9 September 26, 2000 Reading for...

This preview shows pages 1–10. Sign up to view the full content.

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

View Full Document

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

View Full Document

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

View Full Document

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: IE 495 Lecture 9 September 26, 2000 Reading for This Lecture Primary ¡ Horowitz and Sahni, Chapter 2, Section 2 Basic Data Structures What is a data structure? Data structures are schemes for organizing and storing sets. Data structures make it easy to perform certain set operations. Examples of set operations. ¡ add ¡ delete ¡ find_min ¡ delete_min ¡ union Choosing the right data structure Data structures consist of ¡ a scheme for storing the set(s), and ¡ algorithms for performing the desired operations Hence, each set operation has an associated complexity To choose a data structure, you should know ¡ something about the elements of the set, and ¡ what operations you will want to perform on the set. Example: Lists A list is a finite sequence of elements drawn from a set List operations ¡ insert() ¡ delete() ¡ concatenate() ¡ split() List storage ¡ array ¡ linked list Linked Lists Item 1 Item 1 Item 1 Item 1 Item 1 NAME NEXT 1 2 3 4 5 1 3 4 2- Item 1 Item 2 Item 3 Item 4 Empty Linked List Operations NAME NEXT 1 2 3 4 5 1 3 5 2 4- Item 1 Item 2 Item 3 Item 4 New Item NAME NEXT 1 2 3 4 5 1 5 2 4- Item 1 Item 2 Empty Item 4 Item 5 INSERT DELETE Linked List Analysis make_list (a 1 , a 2 , ..., a n ) insert (a, i) delete (i) concatenate (ptr1, ptr2) split (ptr1, i) Data structures in algorithms...
View Full Document

## This note was uploaded on 08/06/2008 for the course IE 495 taught by Professor Linderoth during the Fall '08 term at Lehigh University .

### Page1 / 22

Lecture9 - IE 495 Lecture 9 September 26, 2000 Reading for...

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

View Full Document
Ask a homework question - tutors are online