Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 557 Bytes

File metadata and controls

24 lines (18 loc) · 557 Bytes

sorting

Bubble sort##

Time worstcase - O(n2) bestcase - O(n) when sorted array

**Space O(1) -- there is no external use of array

Merge sort##

*Time Worst Case - O(nlogn) **Space O(n) as there is an external use of any array

Quick Sort

Time Worst Case - O(n2) best Case Tc - O(n*2) **Space and space is O(1) as there is no use of array is done