Chapter 1 - Overview.Fall2009

# Chapter 1 - Overview.Fall2009 - COP 3540 Data Structures...

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

1 21 COP 3540 Data Structures with OOP Overview: Chapter 1

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

View Full Document
2 21 Why Data Structures and Algorithms? Data Structures are merely different arrangements of data in primary memory or on disk, and Algorithms are sequences of instructions that manipulate the data in these data structures in a variety of ways.
3 21 Examples of Some Data Structures Many data structures : Arrays Linked lists Stacks Binary Trees Red Black Trees 2-3-4 Trees Hash Tables Heaps, etc. Different algorithms are needed to build, search, and manipulate data stored in these various structures

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

View Full Document
4 21 Plain Facts: The plain fact is that many items in nature have an natural arrangement ’ with their predecessor or successor element. Think: records in a sequential file Think: a family ‘tree’ If we model this natural occurring arrangement in the computer using some kind of data structure that reflects the real world realities of the data and their implicit relationships, then we need specialized algorithms for building, retrieving, and otherwise accessing the data itself.
5 21 Examples of ‘Plain Facts’ Example 1 Consider a sequence of numbers may be best represented in an array . We need to ‘search’ the array for a number. An Algorithm processes this arrangement of data. If ordered and sufficiently large: binary search If unordered: sequential search is our only option. (Performance issues can be huge: either way.)

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

View Full Document
6 21 Examples of ‘Plain Facts’ Example 2 We may best ‘represent’ (model) a family and children by a tree structure. (a logical data structure) How do we add members to such a tree? How do we Search? How to delete when there are ‘descendents’ How do we best Add to a large tree? We need very specific Algorithms to process this structure.
7 21 Data Structures are NOT Created Equal All have advantages and disadvantages. Worst

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.

## This note was uploaded on 10/04/2011 for the course COP 3540 taught by Professor Bobroggio during the Fall '11 term at University of South Florida.

### Page1 / 20

Chapter 1 - Overview.Fall2009 - COP 3540 Data Structures...

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

View Full Document
Ask a homework question - tutors are online