+ 2

I need help with understanding the QuickSort algorithm please

I’m very confused as to how you program a quicksort. I know the theory, you split the array into two lists then sort each side using pivot values etc. I also know there is a recursive way of doing this. However when I look at any coding examples I just get incredibly confused. That and when I try and implement the algorithm it brings up errors and it confuses me more. If someone could explain this to me using C# examples I would really appreciate it! Thanks 😄

2nd Jul 2019, 9:49 AM
Rebecca Stancliffe
Rebecca Stancliffe - avatar
2 Antworten
+ 2
There is a sololearn lecture on quicksort and it has also CS implementation at the end. https://www.sololearn.com/learn/669/?ref=app This is my recursive python version with comments: https://code.sololearn.com/cmns3OFIx57C/?ref=app Maybe some visual aid can help to understand better: https://youtu.be/PgBzjlCcFvc https://youtu.be/ywWBy6J5gz8
2nd Jul 2019, 11:16 AM
Tibor Santa
Tibor Santa - avatar
+ 2
Thank you!
2nd Jul 2019, 11:29 AM
Rebecca Stancliffe
Rebecca Stancliffe - avatar