Lecture Week 15.1b
Lecture Week 15.1b
Data Structures
◼ Data: Any digital file stored in computer system, such as: audio/video file,
word file, pdf file, images, text file, etc.
42 A 76 B 53 C
Head
42 A 76 B 53 C
Head
◼ Deletion
◼ Insertion
◼ Searching
Queue Data Structure
Queue Data Structure
◼ Cannot join in any random position in the list
◼ Must join at end of the list
◼ Only the first person in the list gets serviced (front of the list),
for ex: bank waiting line
Queue Data Structure
Stack Data structure
Stack Data Structure
◼ You cannot access any
random element of stack
◼ Only top element can be
accessed or removed
Tree
Nature Lover’s View of A Tree
Computer Scientist’s View
Basics
A tree data structure stores information in nodes
• Similar to linked lists:
- There is a first node or root
- Each node has a variable number of references to successors
- Each node, other than the root, has exactly one node pointing to it
Graph
What is a graph?
node
edge