3. Regarding Course
• Course Assignment and Lab Submissions: Mahindra Euclid
• Keeping the class strength in mind, you are encouraged to contact via email as it may
not be feasible to meet in person most of the time.
• It is mandatory to attend all the exams and submit the assignments on time.
• In a supplementary no grade better than grade “D” can be obtained.
4. Course Content
4
Searching- Linear Search, Binary Search
Sorting-Bubble, Insertion Sort, Selection Sort, Radix Sort, Quick sort, Heap Sort, Comparison of Sorting methods.
Basic concepts - Algorithm Specification - Introduction, Recursive algorithms, Data Abstraction Performance analysis -
time complexity and space complexity, Asymptotic Notation - Big O, Omega and Theta notations, Hashing.
Singly Linked Lists-Operations-Insertion, Deletion, Concatenating singly linked lists, Circularly linked
lists- Operations for Circularly linked lists, Doubly Linked Lists- Operations- Insertion, Deletion. Representation of
single, two dimensional arrays, sparse matrices-array and linked representations.
Stack ADT, definition, operations, array and linked implementations in C, applications-infix to postfix
conversion, Postfix expression evaluation, recursion implementation, Queue ADT, definition and operations, array and
linked Implementations in C, Circular Queues-Insertion and deletion operations, Deque (Double ended queue)
ADT, array and linked implementations in C
5. Course Content
5
Trees – Terminology, Representation of Trees, Binary tree ADT, Properties of Binary Trees, Binary
Tree Representations-array and linked representations, Binary Tree traversals, Max Priority Queue ADT-
implementation-Max Heap-Definition, Insertion into a Max Heap, Deletion from a Max Heap., Binary Search Trees,
Definition, Operations- Searching, Insertion and Deletion, AVL Tree.
Graphs – Introduction, Definition, Terminology, Graph ADT, Graph Representations- Adjacency matrix, Adjacency
lists, Graph traversals- DFS and BFS, Minimum Spanning Tree.
6. Text Books
6
Text Books:
1. Fundamentals of Data structures in C, 2nd Edition, E.Horowitz, S.Sahni and Susan Anderson-Freed,
Universities Press.
2. Data structures A Programming Approach with C, D.S.Kushwaha and A.K.Misra, PHI.
3. Data Structures, Seymour Lipschutz, 16th
Edition ,Schaum’s outlines
Reference Books:
4. Data structures: A Pseudocode Approach with C, 2nd edition, R.F.Gilberg And B.A.Forouzan,
Cengage Learning.
5. Data structures and Algorithm Analysis in C, 2nd edition, M.A.Weiss, Pearson.
6. Data Structures using C, A.M.Tanenbaum,Y. Langsam, M.J.Augenstein, Pearson.
7. Data structures and Program Design in C, 2nd edition, R.Kruse, C.L.Tondo and B.Leung,Pearson.
8. Why Study Data Structures?
Efficient Problem
Solving
Improves Coding
Skills
Adaptability to New
Technologies
Crucial for Job
Interviews
9. What is a Data Structure?
A data Structure is “the organization of data in a way so that it can be used efficiently”.
A way of organizing, managing, and storing data for efficient access and modification.
Performance
Efficiency ?
Memory
10. What is an Algorithm?
An algorithm is “A finite set of precise instructions for performing a computation or for
solving a problem”.
11. Introduction
Algorithm is a set of instruction written to carry out certain tasks & the data
structure is the way of organizing the data with their logical relationship
retained.
• To develop a program of an algorithm, we should
select an appropriate data structure for that
algorithm.
• Therefore, algorithm and its associated data
structures from a program.
What is a Program ?
• A Set of Instructions
• Data Structures + Algorithms
• Data Structure = A Container stores Data
• Algorithm = Logic + Control.
12. Classification of Data Structure
• Primitive Data Structure
• Non-Primitive Data Structure
Data structure are normally divided into two broad categories
13. Primitive Data Structure
Primitive data structures are the basic building blocks of data manipulation and storage.
They are predefined by programming languages and are used to represent single values
14. Classification of Data Structure
Data
Structures
Primitive
Data
Structures
Integer Float Character Boolean
Non-
Primitive
Data
Structures
Linear Data
Structure
Array Linked List Stack Queue
Non-Linear
Data
Structure
Trees Graphs
15. Non-Primitive Data Structure
These are derived from the primitive data structures.
The non-primitive
data structures
emphasize on
structuring of a group
of homogeneous
(same type) or
heterogeneous
(different type) data
items.
The choice of a particular data structure depends on following two
considerations
• It must be rich enough in structure to mirror the actual relationships of
the real world data.
• The structure should be simple enough that one can effectively process
the data when necessary.
16. Non-Primitive Data Structure: Operations
The most
commonly used
operation on data
structure are
broadly
categorized into
following types:
• Create
• Select or Access
• Update
• Search
• Sort
• Merge
• Destroy or Delete
17. Question
1. Which of the following best describes a data structure?
A. A way of solving problems logically
B. A method of organizing, managing, and storing data efficiently
C. A set of instructions for performing a computation
D. A program that processes data
2. What is the key feature of non-primitive data structures?
A. They are predefined by programming languages.
B. They emphasize structuring groups of data.
C. They represent single values only.
D. They require no memory allocation
B
B
18. Arrays
An array is defined as a set of finite number of homogeneous elements or same data items.
The simplest type of data structure is the linear array.
Definition
Note: Regardless of the notation, the number in is called as subscript and A[K] is called as subscripted variable
An array can contain one type of data only, either all integer, all float-point number or all character.
If we choose the name for the array, then the elements of are denoted by
I. Subscript notation :
II. Parenthesis notation:
III. Bracket notation:
19. Arrays
Declaration of array is as follows:
int arr[10]
Declaration
Where,
• int specifies the data type or type of elements arrays stores.
• “arr” is the name of array & the number specified inside the square brackets is the number of elements an
array can store, this is also called sized or length of array.
20. Arrays
The elements of array will
always be stored in the
consecutive (continues)
memory location.
The first element of the
array has index zero[0].
The number of elements that can be
stored in an array, that is the size of
array or its length is given by the
following equation:
Following are some of the concepts to be remembered about arrays:
21. Arrays: Example
A linear array STUDENT consisting of the names
of six student is pictured as:
Ex. 1.1
A chain of 28 stores, each having 4 department
may list its weekly sales as:
Ex. 1.2
John
Sandra
Tom
Kelly
Reed
Smith
Store/
Dept
1 2 3 4
1 31 342 2342 234
2 213 1234 2134 321
3 234 123 4654 4567
… … … … …
28 234 243 4567 342