Design and Analysis of Algorithms: Quicksort

Overview

Run the Python code

In the console below, type or paste:
!git clone https://gist.github.com/42aa3fd6e5a06fe46358432f3796cf36.git
cd 42aa3fd6e5a06fe46358432f3796cf36
from quick_sort import *
A = [2, 8, 7, 1, 3, 5, 6, 4]

Python console

To run the example from the textbook, type:
A
quicksort(A)

Now you can experiment with the algorithm by typing in your own array (my_array = [x, y, z]) and running quicksort(my_array)

Source Code

Java
Ruby
Go
C++
Python

For Further Study

Homework