SlideShare a Scribd company logo
Data Structures
Data Structures A data structure is a scheme for organizing data in the memory of a computer.  Some of the more commonly used data structures include lists, arrays, stacks, queues, heaps, trees, and graphs. Binary Tree
Data Structures The way in which the data is organized affects the performance of a program for different tasks.  Computer programmers decide which data structures to use based on the nature of the data and the processes that need to be performed on that data. Binary Tree
Example:  A Queue A  queue  is an example of  commonly used simple data structure.  A queue has beginning and end, called the  front  and  back  of the queue.  Data enters the queue at one end and leaves at the other. Because of this, data exits the queue in the same order in which it enters the queue, like people in a checkout line at a supermarket. 100 th  Anniverary Edition
Example:  A Binary Tree A  binary tree  is another commonly used data structure. It is organized like an upside down tree.  Each spot on the tree, called a  node , holds an item of data along with a left pointer and a right pointer.  Binary Tree
Example:  A Binary Tree The pointers are lined up so that the structure forms the upside down tree, with a single node at the top, called the root node, and branches increasing on the left and right as you go down the tree. Binary Tree
Choosing Data Structures By comparing the queue with the binary tree, you can see how the structure of the data affects what can be done efficiently with the data.
Choosing Data Structures A queue is a good data structure to use for storing things that need to be kept in order, such as a set of documents waiting to be printed on a network printer. .
Choosing Data Structures The jobs will be printed in the order in which they are received.  Most network print servers maintain such a  print queue . .
Choosing Data Structures A binary tree is a good data structure to use for searching sorted data.  The middle item from the list is stored in the root node, with lesser items to the left and greater items to the right.
Choosing Data Structures A search begins at the root.  The computer either find the data, or moves left or right, depending on the value for which you are searching.  Each move down the tree cuts the remaining data in half.
Choosing Data Structures Items can be located very quickly in a tree.  Telephone directory assistance information is stored in a tree, so that a name and phone number can be found quickly.
Choosing Data Structures For some applications, a queue is the best data structure to use.  For others, a binary tree is better.  Programmers choose from among many data structures based on how the data will be used by the program.

More Related Content

PPT
data structures
PPT
Struktur data ppt
PPTX
Introduction of data structures
PPT
PPT
Data Dictionary
PDF
PPTX
Introduction to Data Structures
PPTX
ITGS - Data And Databases
data structures
Struktur data ppt
Introduction of data structures
Data Dictionary
Introduction to Data Structures
ITGS - Data And Databases

What's hot (20)

PPT
Ds intro
PDF
Introduction to database
PPT
Entities and attributes
PPTX
Sap abap database table
PPT
Database structure
PPT
Lect 1-2
PPTX
Types OF Data Structures
PPTX
Database and types of database
PPTX
Data Dictionary
PPS
Database
PDF
Data Structure the Basic Structure for Programming
PPTX
Research design
PPTX
Data structure
PPTX
Tableau Interview Questions
PPTX
Ui path interview questions
PPS
ความรู้เบื้องต้นฐานข้อมูล 1
PPTX
Over view of data structures
PPT
Lect 1-2 Zaheer Abbas
PPTX
What is a DATA DICTIONARY?
Ds intro
Introduction to database
Entities and attributes
Sap abap database table
Database structure
Lect 1-2
Types OF Data Structures
Database and types of database
Data Dictionary
Database
Data Structure the Basic Structure for Programming
Research design
Data structure
Tableau Interview Questions
Ui path interview questions
ความรู้เบื้องต้นฐานข้อมูล 1
Over view of data structures
Lect 1-2 Zaheer Abbas
What is a DATA DICTIONARY?
Ad

Viewers also liked (12)

PPT
Stack Operation In Data Structure
PPTX
non linear data structure -introduction of tree
PPT
Introductiont To Aray,Tree,Stack, Queue
PPTX
Data Structure -List Stack Queue
PPTX
Data structures
PPT
Simple graph types
PPT
Data structures
PPT
Types of graphs
PPTX
Data structure and its types
PPT
List Data Structure
PPT
DATA STRUCTURES
PPT
Fundamentals of data structures
Stack Operation In Data Structure
non linear data structure -introduction of tree
Introductiont To Aray,Tree,Stack, Queue
Data Structure -List Stack Queue
Data structures
Simple graph types
Data structures
Types of graphs
Data structure and its types
List Data Structure
DATA STRUCTURES
Fundamentals of data structures
Ad

Similar to Ch 8 introduction to data structures (20)

PPTX
Data Structures - Lecture 2 [Introduction to Data Structures]
PPTX
Circular Linked List.pptx
PPTX
Introduction of Data Structure
PPT
09c-DataStructuresListsArrays.ppt
PPT
09c-DataStructuresListsArrays (1).p with all informationpt
PPT
09c-DataStructuresListsArrays.ppt
PPT
Data Structures
PPT
Data Structures linked Lists Arrays introduction
PPT
Presentation on data structure And algorithms
PPT
PPT_DATA STRUCTURE.ppt
PPTX
data structure and algorithms arrayby anay.pptx
PDF
PPTX
DATA STRUCTURES and its classifications.pptx
PPTX
Introduction to data structures (ss)
PDF
Data structures
PDF
Data Structure and its Fundamentals
PPTX
dsa.pptx
PPTX
Types_of_Data_Structures_Presentation.pptx
PPTX
Unit 1 Basic concepts to DS
PPTX
Data structure
Data Structures - Lecture 2 [Introduction to Data Structures]
Circular Linked List.pptx
Introduction of Data Structure
09c-DataStructuresListsArrays.ppt
09c-DataStructuresListsArrays (1).p with all informationpt
09c-DataStructuresListsArrays.ppt
Data Structures
Data Structures linked Lists Arrays introduction
Presentation on data structure And algorithms
PPT_DATA STRUCTURE.ppt
data structure and algorithms arrayby anay.pptx
DATA STRUCTURES and its classifications.pptx
Introduction to data structures (ss)
Data structures
Data Structure and its Fundamentals
dsa.pptx
Types_of_Data_Structures_Presentation.pptx
Unit 1 Basic concepts to DS
Data structure

More from Chaffey College (20)

PPT
Strings Objects Variables
PPT
Ruby Chapter 2
PPTX
Social networks and games
PPT
Serious games
PPT
Chapter 05
PPT
Chapter 04
PPT
Chapter 03
PPTX
The games factory 2 alien wars
PPTX
Target markets
PPT
Ch 8 data structures in alice
PPT
Ch 7 recursion
PPTX
Intro to gml
PPT
Power point unit d
PPT
Power point unit c
PPT
Power point unit b
PPT
Power point unit a
PPT
Gamegraphics
PPT
Gamesound
PPT
Ch 6 text and sound in alice
PPT
Ch 5 boolean logic
Strings Objects Variables
Ruby Chapter 2
Social networks and games
Serious games
Chapter 05
Chapter 04
Chapter 03
The games factory 2 alien wars
Target markets
Ch 8 data structures in alice
Ch 7 recursion
Intro to gml
Power point unit d
Power point unit c
Power point unit b
Power point unit a
Gamegraphics
Gamesound
Ch 6 text and sound in alice
Ch 5 boolean logic

Ch 8 introduction to data structures

  • 2. Data Structures A data structure is a scheme for organizing data in the memory of a computer. Some of the more commonly used data structures include lists, arrays, stacks, queues, heaps, trees, and graphs. Binary Tree
  • 3. Data Structures The way in which the data is organized affects the performance of a program for different tasks. Computer programmers decide which data structures to use based on the nature of the data and the processes that need to be performed on that data. Binary Tree
  • 4. Example: A Queue A queue is an example of commonly used simple data structure. A queue has beginning and end, called the front and back of the queue. Data enters the queue at one end and leaves at the other. Because of this, data exits the queue in the same order in which it enters the queue, like people in a checkout line at a supermarket. 100 th Anniverary Edition
  • 5. Example: A Binary Tree A binary tree is another commonly used data structure. It is organized like an upside down tree. Each spot on the tree, called a node , holds an item of data along with a left pointer and a right pointer. Binary Tree
  • 6. Example: A Binary Tree The pointers are lined up so that the structure forms the upside down tree, with a single node at the top, called the root node, and branches increasing on the left and right as you go down the tree. Binary Tree
  • 7. Choosing Data Structures By comparing the queue with the binary tree, you can see how the structure of the data affects what can be done efficiently with the data.
  • 8. Choosing Data Structures A queue is a good data structure to use for storing things that need to be kept in order, such as a set of documents waiting to be printed on a network printer. .
  • 9. Choosing Data Structures The jobs will be printed in the order in which they are received. Most network print servers maintain such a print queue . .
  • 10. Choosing Data Structures A binary tree is a good data structure to use for searching sorted data. The middle item from the list is stored in the root node, with lesser items to the left and greater items to the right.
  • 11. Choosing Data Structures A search begins at the root. The computer either find the data, or moves left or right, depending on the value for which you are searching. Each move down the tree cuts the remaining data in half.
  • 12. Choosing Data Structures Items can be located very quickly in a tree. Telephone directory assistance information is stored in a tree, so that a name and phone number can be found quickly.
  • 13. Choosing Data Structures For some applications, a queue is the best data structure to use. For others, a binary tree is better. Programmers choose from among many data structures based on how the data will be used by the program.