-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
31 lines (31 loc) · 1.62 KB
/
index.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
<html>
<head>
<title>Algorithm Demo</title>
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="main.css">
</head>
<body>
<header class='header clearfix'>
<img src="img/logoWhite.png" class='logo'>
<h1>Insert-Sort Demo</h1>
<p>This is a visual demonstration of the insert sort method.</p>
</header>
<section class='backImage clearfix'>
<section class='buttons clearfix'>
<h1>Try it out:</h1>
<button type='button' class='button' id='create'>Add a number.</button>
<button type='button' class='button' id='sort'>Sort the numbers!</button>
</section>
<section class='showBox clearfix' id='showBox'>
<p id='description'>The insert method will sort each element in the list one by one. Starting at the index of 1, the function will take the current index and compare it to the element before it. If the value of the previous element is lower, then the current element will be inserted before the previous one. When it finds a value that it is equal to or greater than, it will stop in its current position. Once every element has been checked, the list will be in ascending order. </p>
<h2 class='clear'> Big O = O(n<sup>2</sup>)</h2>
<ul class='list' id='things'></ul>
</section>
</section>
<footer class='footer'>
<p>By Ben Spears</p>
</footer>
<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src='script.js'></script>
</body>
</html>