Question DSA-SORT-0068
HardWhat sorting algorithm does Python use, and what is its best case?
- A.
Bubble sort, O(n)
- B.
Heap sort, O(n log n)
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Sorting question
What sorting algorithm does Python use, and what is its best case?
Bubble sort, O(n)
Heap sort, O(n log n)
Sign up free to see the answer and a step-by-step explanation.
Quick sort, O(n log n)
Timsort, O(n) on already sorted (or reverse sorted) data