CH 12 Data Structures
CH 12 Data Structures
Computer Engineering
CEN 123, Fall 2024-2025
Assoc. Prof. Dr. Mümine KAYA KELEŞ
Department of Computer Engineering
Adana Alparslan Türkeş Science and Technology University
CHAPTER 12
DATA STRUCTURES AND
DATA MODELS
COURSE OUTLINE
4
What is Algorithm?
Algorithm:
A computable set of steps to achieve a desired result
A well-defined procedure that allows a computer to solve
a problem.
Ralationship to Data Structure
Example: Find an element
2 4 6
1 3 5 7
1 2 3 4 5 6 7
Algorithms vs. Data Structures
Algorithms vs. Data Structures
From the data structure point of view, the following are some
important categories of algorithms:
Greedy
Divide and Conquer
Dynamic Programming
Exhaustive Search
Which Data Structure or
Algorithm is better?
Must Meet Requirement
High Performance
Low RAM footprint
Easy to implement
Encapsulated
What is Data Structures?
12
13
Atomic Variables
Add
Index
Key
Position
Priority
Get
Change
Delete
What is Data Structures?
Example:library
is composed of elements (books)
Accessing a particular book requires
knowledge of the arrangement of the
books
Users access books only through the
librarian
Structures include
linked lists
Stack, Queue
binary trees
…and others
Common Data Structures
Array
Stack
Queue
Linked List
Tree
Heap
Hash Table
Priority Queue
Common Data Structures -
Introduction
Dynamic data structures
Data structures that grow and shrink during execution
Linked lists
Allow insertions and removals anywhere
Stacks
Allow insertions and removals only at top of stack
Queues
Allow insertions at the back and removals from the front
Binary trees
High-speed searching and sorting of data and efficient
elimination of duplicate data items
SEARCHING TECHNIQUES
1. BUBBLE SORT
2. INSERTION SORT
3. SELECTION SORT
4. QUICK SORT