Skip to content
Azhimathi Mayam logoDSA Study HubPCCST303 · KTU · S3
Module 4 · 11 hours

Sorting and Searching

Official syllabus text (word for word)

Sorting and Searching — Sorting Techniques: Selection Sort, Insertion Sort, Quick Sort, Merge Sort, Heap Sort, Radix Sort. Searching Techniques: Linear Search, Binary Search, Hashing - Hashing functions: Mid square, Division, Folding, Digit Analysis; Collision Resolution: Linear probing, Quadratic Probing, Double hashing, Open hashing.

  1. 1
    Selection sort

    Repeatedly select the smallest remaining element and swap it to the front.

    lesson livevisualizerC codeasked 1×
  2. 2
    Insertion sort

    Insert each element into its correct place in the already-sorted left part.

    lesson livevisualizerC codeasked 2×
  3. 3
    Quick sort

    Partition around a pivot, then recursively sort the two sides.

    lesson livevisualizerC codeasked 3×
  4. 4
    Merge sort

    Split the array in half, sort each half, merge the two sorted halves.

    lesson livevisualizerC codeasked 1×
  5. 5
    Heap sort

    Build a max-heap, then repeatedly move the root (maximum) to the end.

    lesson livevisualizerC codeasked 1×
  6. 6
    Radix sort

    Sort digit by digit, least significant first, using stable buckets.

    lesson livevisualizerC codeasked 2×
  7. 7
    Linear search

    Check every element in turn until the key is found.

    lesson livevisualizerC code
  8. 8
    Binary search

    Halve the search interval of a sorted array at each step.

    lesson livevisualizerC codeasked 1×
  9. 9
    Hashing and hash functions

    Map keys to table indices: division, mid-square, folding and digit analysis.

    lesson livevisualizerC codeasked 4×
  10. 10
    Collision resolution: linear probing, quadratic probing, double hashing

    Resolve collisions inside the table: linear probing, quadratic probing, double hashing.

    lesson livevisualizerC codeasked 2×
  11. 11
    Open hashing (separate chaining)

    Separate chaining: each slot holds a linked list of all keys that hash there.

    lesson livevisualizerC codeasked 3×
  12. 12
    Bubble sort (enrichment)bonus

    Enrichment: repeatedly swap adjacent out-of-order pairs.

    lesson livevisualizer