Knapsack Problem: Assignment - 03
Knapsack Problem: Assignment - 03
Assignment_03
1. Make a review of Knapsack problem?
2. Quick sort program, review also these one?
Knapsack problem
Quicksort
Quicksort is a divide-and-conquer algorithm. It works by selecting a 'pivot' element
from the array and partitioning the other elements into two sub-arrays, according to
whether they are less than or greater than the pivot. The sub-arrays are
then sorted recursively.
The time complexity of Quicksort is O(n log n) in the best case, O(n log n) in the
average case, and O(n^2) in the worst case. But because it has the best
performance in the average case for most inputs, Quicksort is generally considered
the “fastest” sorting algorithm.