Min Chen School of Computer Science and Engineering Seoul National University Data Structure: Chapter 1
What is Data Structure The Importance of Data Structure Type of Data Structure
Data structures are ways in which data is arranged in your computer’s memory (or stored on disk). Algorithms are the procedures a software program uses to manipulate the data in these structures.
Almost every computer program, even a simple one, uses data structures and algorithms. Example: Program: To print a address list ▪ Data Structure: Array ▪ Algorithm: Loop Program = Data Structure + Algorithm
Arrays Ordered Array Stacks Queues Priority Queues Linked Lists Tree Binary Tree Hash Table Heap
A container to be filled with elements (0,0) (4,2) Each element can be accessed via unique remark Fig.1 A 2-Dimensional Array
You can only eat the top apple first FILO (First In Last Out) Fig.2 An Apple Stack
The one came first can get the ticket first FIFO(First In First Out) Fig.3 A Queue for Tickets
A linear sequence, but the Storage of elements is always not linear Data Link Each record contains a reference (i.e., a link) to the next record in the sequence Fig.4 A Gold Chain
Start from the root, end at the leaves No loop allowed Is Not a Tree in Data Structure Is a Tree in Data Structure Fig.5 A Family Tree of AbramFig.6 An Unusual Family Tree