ICS 2105 Data Structures &
Algorithms
Prof Muliaro Wafula
Data Structures & Algorithms 1
Outline
• Data Structures - Definition, Classification of Data Structures, Operations on Data Structures, Abstract Data
Type (ADT), Preliminaries of algorithms. Time and Space complexity.
• Searching - Linear search, Binary search, Fibonacci search.
• Sorting- Insertion sort, Selection sort, Exchange (Bubble sort, quick sort), distribution (radix sort), merging
(Merge sort) algorithms
Data Structures & Algorithms 2
• Data Structures is the concept of set of algorithms used to structure the information.
➢ These algorithms are implemented using C, C++, Java, etc
• ➢ Structure the information means store and process data in an efficient manner.
• ➢ To store and process data we may use the following operations
• [Link]() [Link]()
• [Link]() [Link]()
• [Link]() [Link]()
• [Link]() [Link]()
• [Link]()
➢ So data structure may contain algorithms, use for different operations implement these algorithms by a programming
language
➢ For example for stack data structure write algorithms for different operations
• [Link],
• [Link] and
• [Link].
Data Structures & Algorithms 3
Classification of Data Structures
• Primitive data structures: • Non-primitive data structures
• ➢ Primitive data structures are built in types in • ➢ They are Array, Structure, Union, Files etc
most programming languages. They are
• ➢ A Non-primitive data type is further divided
• ➢ Integer: It is whole numbers. i.e. negative into Linear and Non-Linear data structure
values,0,positive values
• ➢ Boolean: it represents true or false.
• Float
• Character
Data Structures & Algorithms 4
Data Structures & Algorithms 5
Data Structures & Algorithms 6
Data Structures & Algorithms 7
Data Structures & Algorithms 8
Data Structures & Algorithms 9
Data Structures & Algorithms 10
Data Structures & Algorithms 11
Data Structures & Algorithms 12
Data Structures & Algorithms 13