-
Notifications
You must be signed in to change notification settings - Fork 54
/
Quicksort.html
119 lines (105 loc) · 3.65 KB
/
Quicksort.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<html>
<!-- THIS FILE WAS GENERATED BY A SCRIPT: DO NOT EDIT IT! -->
<head>
<link href="style.css" rel="stylesheet" type="text/css"/>
<title>
Design and Analysis of Algorithms: Quicksort
</title>
</head>
<body>
<div id="header">
<div id="logo">
<img src="graphics/Julia.png">
</div>
<div id="user-tools">
<a href="index.html">Home</a>
<a href="about.html">About</a>
<a href="feedback.html">Feedback</a>
</div>
</div>
<h1>
Design and Analysis of Algorithms: Quicksort
</h1>
<div style="text-align:center">
<p>
<img
src="https://upload.wikimedia.org/wikipedia/commons/6/6a/Sorting_quicksort_anim.gif">
</p>
</div>
<h2>
Overview
</h2>
<h2>
Run the Python code
</h2>
<p>
In the console below, type or paste:
<br/>
<code>
!git clone https://gist.github.com/42aa3fd6e5a06fe46358432f3796cf36.git
<br/>
cd 42aa3fd6e5a06fe46358432f3796cf36
<br/>
from quick_sort import *
<br/>
A = [2, 8, 7, 1, 3, 5, 6, 4]
<br/>
</code>
</p>
<div class="python-console">
<iframe style="width: 640; height: 480;"
name="embedded_python_anywhere"
src="https://www.pythonanywhere.com/embedded3/" scrolling="yes">
</iframe>
<figcaption>
Python console
</figcaption>
</div>
<p>
To run the example from the textbook, type:
<br/>
<code>
A
<br/>
quicksort(A)
</code>
</p>
<p>
Now you can experiment with the algorithm by typing
in your own array (my_array = [x, y, z])
and running quicksort(my_array)
</p>
<h2>
Source Code
</h2>
<p>
<a href="https://github.com/gcallah/algorithms/tree/master/Java/Quicksort">Java</a><br>
<a href="https://github.com/gcallah/algorithms/tree/master/Ruby/Quicksort">Ruby</a><br>
<a href="https://github.com/gcallah/algorithms/tree/master/Go/Quicksort">Go</a><br>
<a href="https://github.com/gcallah/algorithms/tree/master/C++/Quicksort">C++</a><br>
<a href="https://github.com/gcallah/algorithms/tree/master/Python/Quicksort">Python</a><br>
</p>
<h2>
For Further Study
</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Quicksort">
Quicksort
</a>.
</li>
</ul>
<h2>
Homework
</h2>
</body>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-97026578-2', 'auto');
ga('send', 'pageview');
</script>
</html>