Lecture 1 - Intro
Lecture 1 - Intro
DATA
STRUCTURES
Introduction to
Data structures
COURSE INFORMATION
• All Announcement: Syllabus, Lecture notes, etc. will be on
https://dys.mu.edu.tr/
– Sharing lecture notes on the internet is forbidden!
• Attendance Policy: You should attend at least 70% of classes to pass the
course.
– Means that you should attend approx. 10 lectures out of 14.
Applying several
basic algorithms
on variety of
Improving
data structures
programming
skills in C
CONTENT
• Pointers • Sorting Queues
• Linked Lists • Searching
• Stacks • Insertion
• Queues • Deletion
• Heaps • Merging
• Trees
• Graphs
Stacks
SYLLABUS
Week (Lec - Lab) Topic
Week 1 Introduction to Data Structures
Week 2 Pointers
Week 3 C Structures - Memory Management
Week 4 LAB
Week 5 Linked Lists - 1
Week 6 Linked Lists - 2
Week 7 LAB This outline shows the
Week 8 Stack & Queue list of topics associated
with each class meeting.
Week 9 LAB
Week 10 Trees - 1 However, it is tentative
Week 11 Trees - 2 - Heap and subject to change as
Week 12 LAB seen necessary and
Week 13 Graphs appropriate during the
Week 14 Wrap-Up semester.
LAB SESSIONS
Hasan Yiğit
The research assistant in our department
1 2 3 4
Follow the Read the Search on the Get your hands
lectures and the textbooks and internet for the dirty
labs lecture notes parts that you • Do the exercises in
Not for a grade but to did not front of the
learn and get better understand computer
clearly
You cannot learn to play the
piano just by watching
someone’s piano lecture,
even if that someone is the
best pianist in the world!
Frank Stajano
KEEP IN MIND
• Be disciplined and aware of your
responsibilities
• In class
• In everday life 1
• Be on time
• For class
• For appointments
• For your duties
2
• Be respectful
• To your instructors
• To your classmates 3
FORBIDDEN
DO NOT sign the attendence list for someone else!!
It is not It is
Ethical Dangerous
Legal Strictly forbidden
FAIRNESS
• It is sometimes a difficult thing
to provide fairness in a crowded
class.
It is not a sign of
weakness
LAST
BUT American football player
NOT
LEAST Don't give up!
• Arranged
– Stored in an orderly way in memory
• Processed
– Algorithms: shortest path etc.
Data Structure is a special way of
organizing and storing data in a computer
in order to facilitate access and
modification so that data can be used
efficiently.
Any operation can be These data structures do not allow any
performed in these data specific instruction to be performed on
items the data items directly.
data elements
arranged in
sequential
manner
data elements
arranged in non-
Associated memory Associated memory sequential manner
locations are fixed locations changes
WHY WE NEED DATA STRUCTURES?
Efficient Memory use: With efficient use of data structure memory usage can be
optimized, for e.g we can use linked list vs arrays when we are not sure about the
size of data.
Speed: To handle big data, we need to organize the data in proper way so
Manipulation of large amount of data can be carried out easily
Abstraction: Data structure serves as the basis of abstract data types, the data
structure defines the physical form of ADT(Abstract Data Type).
WHICH OPERATIONS WE CAN
PERFORM?
• Traversing: Traversing the data structure means visiting each element of the data structure in
order to perform some specific operation like searching or sorting.
• Insertion: Insertion can be defined as the process of adding the elements to the data structure at
any location.
• Deletion: The process of removing an element from the data structure is called Deletion. We can
delete an element from the data structure at any random location.
• Searching: The process of finding the location of an element within the data structure is called
Searching. There are two algorithms to perform searching, Linear Search and Binary Search.
• Sorting: The process of arranging the data structure in a specific order is known as Sorting. There
are many algorithms that can be used to perform sorting, for example, insertion sort, selection sort,
bubble sort, etc.
• Merging: When two lists List A and List B of size M and N respectively, of similar type of elements,
clubbed or joined to produce the third list, List C of size (M+N), then this process is called merging
No single data structure works well for all
purposes, so it is important to know the
strengths and limitations of them
David Jones