-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsort.html
160 lines (155 loc) · 8.06 KB
/
sort.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!DOCTYPE html>
<html>
<head>
<title>Quicksort Algorithm</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="css/hp.css" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Raleway:200,400,800' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="js/script.js"></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="homepage.html" class="navbar-brand">CoC</a>
</div>
<!-- Collection of nav links and other content for toggling -->
<div id="navbarCollapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="homepage.html">Home</a></li>
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Computer<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="hp.html">Hewlett Packard is Founded</a></li>
<li><a href="bell.html">Bell Labs Relay Interpolator</a></li>
<li><a href="firstprogram.html">First Computer Program</a></li>
<li><a href="ibm.html">IBM 650 Magnetic Drum Calculator</a></li>
<li><a href="super.html">CDC 6600 Supercomputer</a></li>
<li><a href="micro.html">First Microprocessor</a></li>
<li><a href="pc.html">Personal Computer </a></li>
<li><a href="camera.html">First Camera Phone</a></li>
<li><a href="earth.html">Fastest Supercomputer(Earth Simulator)</a></li>
<li><a href="arduino.html">Arduino</a></li>
</ul>
</li>
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">AI & Robotics <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="cybernetics.html">Cybernetics</a></li>
<li><a href="turing.html">Turing Test</a></li>
<li><a href="lisp.html">LISP</a></li>
<li class="active"><a href="sort.html">Quicksort Algorithm</a></li>
<li><a href="lambda.html">LMI Lambda</a></li>
<li><a href="blue.html">Deep Blue</a></li>
<li><a href="asimo.html">ASIMO</a></li>
<li><a href="watson.html">IBM Watson</a></li>
<li><a href="siri.html">SIRI is announced</a></li>
</ul>
</li>
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Software & Languages <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="plank.html">Plankalkül</a></li>
<li><a href="fort.html">FORTRAN</a></li>
<li><a href="cobol.html">COBOL</a></li>
<li><a href="ascii.html">ASCII</a></li>
<li><a href="unix.html">UNIX</a></li>
<li><a href="clang.html">C Language Introduced</a></li>
<li><a href="matlab.html">MATLAB Released</a></li>
<li><a href="cplus.html">C++ Language Introduced</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>
</div>
</div>
</nav>
<header class="v-header container">
<div class="fullscreen-video-wrap">
<video src="video/video.mp4" autoplay="" loop="">
</video>
</div>
<div class="header-overlay"></div>
<div class="header-content text-md-center">
<a href="sort.html"><h1>Quicksort Algorithm<br/>(1960)</h1></a>
</div>
</header>
<div class="container-fluid subdiv">
<div class="row">
<div class="container-fluid-6 power">
<div class="col-sm-12">
<h1>Tony Hoare</h1>
</div>
</div>
<div class="container-fluid-6 powers">
<div class="row">
<div class="col-md-6 first">
<p>
Sir Charles Antony Richard Hoare
(born 11 January 1934),
is a British computer scientist. He developed the sorting algorithm quicksort in 1959/1960.
He also developed Hoare logic for verifying program correctness, and the formal language communicating sequential processes (CSP)
to specify the interactions of concurrent processes (including the dining philosophers problem) and the inspiration for the occam
programming language.
</p>
</div>
<div class="col-md-6">
<img src="img/sort1.jpg" alt="Image-Unavailable" id="first" title="Tony Hoare"/>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid subdiv relay">
<div class="row">
<div class="container-fluid-6 power">
<div class="col-sm-12">
<h1>Quicksort Algorithm</h1>
</div>
</div>
<div class="container-fluid-6 powers">
<div class="row">
<div class="col-md-6 second sort">
<img src="img/sort2.gif" alt="Image-Unavailable" id="sort" title="Quicksort Algorithm"/>
</div>
<div class="col-md-6">
<p class="second">
Quicksort (sometimes called partition-exchange sort) is an efficient sorting algorithm, serving as a systematic method for placing the elements of an array in order.
When implemented well, it can be about two or three times faster than its main competitors, merge sort and heapsort.
Mathematical analysis of quicksort shows that, on average, the algorithm takes O(n log n) comparisons to sort n items. In the worst case,
it makes O(n2) comparisons, though this behavior is rare. The steps are:<br />
1.Pick an element, called a pivot, from the array.<br />
2.Partitioning: reorder the array so that all elements with values less than the pivot come before the pivot, while all elements with values greater than the pivot come after it (equal values can go either way). After this partitioning, the pivot is in its final position. This is called the partition operation.<br />
3.Recursively apply the above steps to the sub-array of elements with smaller values and separately to the sub-array of elements with greater values.<br />
</p>
</div>
</div>
</div>
</div>
</div>
<footer class="container-fluid text-center bg-lightgray">
<div class="copyrights" style="margin-top:25px;">
<p>DHA Suffa University © 2018, All Rights Reserved
<br>
<span>Web Design By: Muhammad Ali Khan</span></p>
<p><a href="http://cs.dsu.edu.pk/" target="_blank">CS@DSU</a></p>
</div>
</footer>
</body>
</html>