I'm trying to implement a basic quicksort algorithm, I've understood the basic concept behind quicksort and now I'm looking online for a step by step guide.
I've followed through about 7/8 guides and what I've found is that every guide has different ways of using the pivot and different ways of using the two pointers/counters.
Some follow these steps for the pivot:
1.Decide a pivot
2.Swap the pivot with the last element of the array
3.Search the element from the left that is greater than pivot and element that is smaller than pivot from right
4.Swap those elements
Others do this:
1.Choose a pivot
2.Put left pointer to 0, a right pointer to the last element of the array
3.Start comparing left pointer to pivot, if left is smaller than pivot move pointer forward
Let's just say that before reading the guides I think I knew more about the quicksort algorithm.
What guide do you recommend?
Edit: there's some kind of problem with text formatting, I'm sorry