Basic Terminologies of Data
Structures
Unit: Complexity, Arrays, Searching,
Sorting & Comparison
Introduction to Data Structures
• Data Structure: Way to organize and store
data efficiently.
• Types: Linear (Arrays, Linked List), Non-linear
(Trees, Graphs).
• Importance: Efficient data handling, faster
algorithms.
Complexity Analysis
• Measures efficiency of algorithms.
• Time Complexity: Growth of execution time
with input size.
• Space Complexity: Growth of memory usage
with input size.
Asymptotic Notations
• Big-O (O): Upper bound → Worst-case
performance.
• Big-Omega (Ω): Lower bound → Best-case
performance.
• Big-Theta (Θ): Tight bound → Average-case
performance.
Arrays & Operations
• Array: Collection of elements stored in
contiguous memory locations.
• Operations: Traversal, Insertion, Deletion,
Updating.
• Applications: Storing lists, matrices,
implementing other DS.
Linear Search
• Checks each element one by one until target is
found.
• Best Case: Ω(1) → element found at first
position.
• Worst Case: O(n) → element at last or not
found.
• C Program Example:
Binary Search
• Efficient searching on sorted arrays.
• Divide the array into half, check middle
element.
• Best Case: Ω(1), Worst Case: O(log n).
• C Program Example:
Bubble Sort
• Repeatedly swaps adjacent elements if they
are in wrong order.
• Complexity: Best O(n), Worst O(n^2).
• C Program Example included.
Selection Sort
• Finds the minimum element and places it at
correct position.
• Complexity: Always O(n^2).
• Simple but inefficient for large datasets.
Insertion Sort
• Builds sorted array one element at a time.
• Best: O(n), Worst: O(n^2).
• Efficient for small datasets.
Heap Sort
• Uses binary heap data structure.
• Complexity: O(n log n) for all cases.
• Efficient and widely used.
Shell Sort
• Improved version of Insertion Sort using gaps.
• Average complexity: O(n^1.5), Worst: O(n^2).
• Not stable but efficient for medium-sized data.
Comparison of Sorting Algorithms
• Bubble Sort: O(n^2), simple but slow.
• Selection Sort: O(n^2), better for small
datasets.
• Insertion Sort: O(n^2), good for nearly sorted
data.
• Heap Sort: O(n log n), efficient and consistent.
• Shell Sort: O(n^1.5), practical improvement
over insertion sort.
Summary
• Data Structures form the base of efficient
algorithms.
• Complexity Analysis helps to compare
performance.
• Searching: Linear vs Binary Search.
• Sorting: Bubble, Selection, Insertion, Heap,
Shell.
• Choice depends on input size, dataset nature
& application.

data structure ppt slide about the basic terminology

  • 1.
    Basic Terminologies ofData Structures Unit: Complexity, Arrays, Searching, Sorting & Comparison
  • 2.
    Introduction to DataStructures • Data Structure: Way to organize and store data efficiently. • Types: Linear (Arrays, Linked List), Non-linear (Trees, Graphs). • Importance: Efficient data handling, faster algorithms.
  • 3.
    Complexity Analysis • Measuresefficiency of algorithms. • Time Complexity: Growth of execution time with input size. • Space Complexity: Growth of memory usage with input size.
  • 4.
    Asymptotic Notations • Big-O(O): Upper bound → Worst-case performance. • Big-Omega (Ω): Lower bound → Best-case performance. • Big-Theta (Θ): Tight bound → Average-case performance.
  • 5.
    Arrays & Operations •Array: Collection of elements stored in contiguous memory locations. • Operations: Traversal, Insertion, Deletion, Updating. • Applications: Storing lists, matrices, implementing other DS.
  • 6.
    Linear Search • Checkseach element one by one until target is found. • Best Case: Ω(1) → element found at first position. • Worst Case: O(n) → element at last or not found. • C Program Example:
  • 7.
    Binary Search • Efficientsearching on sorted arrays. • Divide the array into half, check middle element. • Best Case: Ω(1), Worst Case: O(log n). • C Program Example:
  • 8.
    Bubble Sort • Repeatedlyswaps adjacent elements if they are in wrong order. • Complexity: Best O(n), Worst O(n^2). • C Program Example included.
  • 9.
    Selection Sort • Findsthe minimum element and places it at correct position. • Complexity: Always O(n^2). • Simple but inefficient for large datasets.
  • 10.
    Insertion Sort • Buildssorted array one element at a time. • Best: O(n), Worst: O(n^2). • Efficient for small datasets.
  • 11.
    Heap Sort • Usesbinary heap data structure. • Complexity: O(n log n) for all cases. • Efficient and widely used.
  • 12.
    Shell Sort • Improvedversion of Insertion Sort using gaps. • Average complexity: O(n^1.5), Worst: O(n^2). • Not stable but efficient for medium-sized data.
  • 13.
    Comparison of SortingAlgorithms • Bubble Sort: O(n^2), simple but slow. • Selection Sort: O(n^2), better for small datasets. • Insertion Sort: O(n^2), good for nearly sorted data. • Heap Sort: O(n log n), efficient and consistent. • Shell Sort: O(n^1.5), practical improvement over insertion sort.
  • 14.
    Summary • Data Structuresform the base of efficient algorithms. • Complexity Analysis helps to compare performance. • Searching: Linear vs Binary Search. • Sorting: Bubble, Selection, Insertion, Heap, Shell. • Choice depends on input size, dataset nature & application.