Data Structures and Algorithms - Notes
UNIT I: Algorithm Basics and Data Structures
Algorithm: A step-by-step procedure to solve a problem or perform a computation.
Features of Algorithms: Input, Output, Definiteness, Finiteness, Effectiveness.
Pseudocode: A high-level description of an algorithm using simple English statements.
Data Structures: A way of organizing and storing data efficiently for operations.
Types: Linear (Array, Stack, Queue, Linked List) and Non-Linear (Tree, Graph).
ADT (Abstract Data Type): A model defining data and operations without implementation details.
Searching: Linear Search, Binary Search.
Sorting: Bubble Sort, Selection Sort, Insertion Sort.
UNIT II: Stacks, Queues, and Linked Lists
Stacks: Linear data structure (LIFO).
Operations: Push, Pop, Peek.
Applications: Expression evaluation, recursion, backtracking.
Queues: Linear data structure (FIFO).
Operations: Enqueue, Dequeue.
Applications: Scheduling, buffering.
Linked List: Dynamic data structure with nodes.
Types: Singly Linked List, Doubly Linked List.
Operations: Insertion, Deletion, Traversal.
Stack and Queue using Linked List: Efficient for dynamic memory allocation.
UNIT III: Trees and Graphs
Trees: Non-linear hierarchical data structure.
Binary Tree: Each node has at most two children.
Binary Search Tree (BST): Left < Root < Right property.
Operations: Insertion, Deletion, Traversal (Inorder, Preorder, Postorder).
Graphs: Collection of vertices and edges.
Terminology: Vertex, Edge, Degree, Path, Cycle.
Representation: Adjacency Matrix, Adjacency List.
Traversals: BFS (Breadth First Search), DFS (Depth First Search).
UNIT IV: Practical Work (Using C Programming)
Week 1-2: Array implementation – Creation, insertion, deletion.
Week 3-5: Searching (Linear & Binary), Sorting (Bubble, Selection, Insertion).
Week 6-8: Stack & Queue using arrays.
Week 9-12: Linked List, Stack & Queue using Linked List.
Week 13-15: Binary Search Tree implementation.
Total Practical Hours: 30