Unit 1: Introduction to Linear Data Structures
Definition and Importance of Linear Data Structures
Linear data structures store elements in a sequential manner. They are easy to implement and are used widely in
real-world applications.
Examples: Arrays, Linked Lists, Stacks, Queues.
Abstract Data Types (ADTs) and Their Implementation
An ADT defines a data structure logically. Implementation can be done using arrays or linked lists.
- Stack (LIFO): push(), pop()
- Queue (FIFO): enqueue(), dequeue()
- List: insert(), delete(), search()
Time Complexity Analysis
Used to evaluate the efficiency of an algorithm.
Common notations:
- O(1): Constant
- O(n): Linear
- O(log n): Logarithmic
- O(n^2): Quadratic
Space Complexity Analysis
Determines how much memory an algorithm uses.
Includes input space and auxiliary space.
Searching Techniques: Linear Search
Linear search checks each element one-by-one.
Unit 1: Introduction to Linear Data Structures
Best case: O(1), Worst case: O(n).
Linear & Binary Search
Binary search divides a sorted array in half repeatedly.
Time complexity: O(log n).
Faster than linear search on sorted data.
Sorting Techniques: Bubble, Selection, Insertion Sort
- Bubble Sort: Swaps adjacent elements. O(n^2).
- Selection Sort: Finds min in each pass. O(n^2).
- Insertion Sort: Inserts elements into correct position. Best: O(n), Worst: O(n^2).
Basics of C Programming
C is a structured programming language. Key concepts:
- Variables
- Loops
- Conditions
- Functions
Used to implement data structures.
Revision
Revise all key topics with sample programs and MCQs. Practice helps strengthen understanding.
Swachh Bharat
A government initiative for cleanliness. Often linked with social responsibility activities in colleges.