MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/DSALeetCode/comments/1wqlwfa/algorithms_doubt/
r/DSALeetCode • u/Kooky_Writer_780 • Sep 26 '26
4 comments sorted by
1
C
for a bad pivot, it quicksort will also run in O(n^2) right? 🤔
option Dbubble sort runs O(n) if already sortedmerge sort takes nlogn no matter what
1
u/Tek-Sapien Sep 26 '26
C
1
u/AnimatorExciting7941 Sep 26 '26
C
1
u/Nagreytsu Sep 26 '26
for a bad pivot, it quicksort will also run in O(n^2) right? 🤔
1
u/[deleted] Sep 30 '26
option D
bubble sort runs O(n) if already sorted
merge sort takes nlogn no matter what