Quick Sort Algorithm Explained!

preview_player
Показать описание
Quick Sort
Рекомендации по теме
Комментарии
Автор

Master Data Structures & Algorithms For FREE at AlgoMap.io!

GregHogg
Автор

Me before this video: "I wanna learn how to code"

Me after this video: "nevermind"

YVRDru
Автор

You should mention the worst case also which is n^2

jeysan.v
Автор

I guess the implementation in the end has complexity 2nlogn, because instead of creating left and right arrays separately, it could have just been a single for loop with one if-else inside

DMH_Minecraft
Автор

If you actually combine the lists, then it becomes merge sort with a pivot. Be careful about implementing this. The sorting should be fone in-place.

spacey
Автор

@GregHogg can you make reels on top 150 leetcode interview questions? Also can you also add similar problems with problem solving techniques!
I know it’s a lot to cover but if you could fit that in reels which is really helpful

bhagyashreearakeri
Автор

I don't think we should we separate arrays for this.

simpletechnologyhelp
Автор

hahaha merge sort with pivot?
the thing with quick sort is you never make copies or other new array, space complexity should be O(1) and you just swap out the elements in the array itself.

CodeErrorOfficial
Автор

It would be great if you could paste the source code as part of the comment section, Thanks!

siddhantkumar
Автор

Where's the code for quick sort?😅

tigerrbharat
Автор

QuickSort is cool and all, but I just use the good 'ol "set the value of the element to the index of the element" technique and it gives me a sorted int[] in O(N).

I call it GenieSort as your wish for a sorted array has now technically been fulfilled.

LoveOlsson