Divide and Conquer
Divide problem into subproblems, solve, and combine results. 3 programs in C with full explanations for VTU BCSL40A.
Divide and Conquer
T: O(n²)
S: O(1)
Selection Sort
Selection Sort repeatedly finds the minimum element from the unsorted portion of an array and places it at the correct position. This implementation measures time complexity empirically.
View Algorithm
Divide and Conquer
T: O(n log n) avg, O(n²) worst
S: O(log n)
Quick Sort
Quick Sort is a fast divide-and-conquer sorting algorithm that partitions the array around a pivot, recursively sorting subarrays. This implementation includes empirical time analysis.
View Algorithm
Divide and Conquer
T: O(n log n)
S: O(n)
Merge Sort
Merge Sort is a stable divide-and-conquer sorting algorithm that recursively divides the array in half, sorts each half, and merges them back in order.
View Algorithm