You are on page 1of 6

Quick Sort

Algorithm in
Python
SCHOOL OF I NFORMATI ON
TECHNOLOGY

Group 3
SCHOOL OF I NFORMATI ON
SUBJECT - CC1 03
TECHNOLOGY

Algorithm’s Definition
• Quick sort is a highly efficient sorting algorithm that follows the
divide-and-conquer strategy. 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 recursively sorted. This
process continues until the entire array is sorted. Quick sort is
known for its simplicity, low memory usage, and fast average-
case performance.

2
SCHOOL OF I NFORMATI ON
SUBJECT - CC1 03
TECHNOLOGY

Uses/Practical Applications
Quick sort is widely used in various programming languages and
applications due to its efficiency.
• Practical applications include:
– Sorting large datasets in databases.
– Implementations in programming libraries for sorting
functions.
– Used in various algorithms like median finding algorithms.

3
SCHOOL OF I NFORMATI ON
SUBJECT - CC1 03
TECHNOLOGY

Big O Notation
• Time Complexity:
– Best Case: O(n log n)
– Average Case: O(n log n)
– Worst Case: O(n2)
• Space Complexity:
– O(log n)

4
SCHOOL OF I NFORMATI ON
SUBJECT - CC1 03
TECHNOLOGY

Code

5
SCHOOL OF I NFORMATI ON
TECHNOLOGY

Thank You!

You might also like