-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
138 lines (126 loc) · 5.94 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
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
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./style.css">
<title>Sorting Visualization</title>
</head>
<body>
<div class="background">
<div class="nav-bar" id="navigation">
<div class="inputs" style="margin-left: 16px;">
<label for="inputNumber" style="color: rgb(0, 0, 0); margin-top: 0"> Input: </label>
<input type="text" id="inputNumber" value="20,10,30,5,50,45,15">
<button class="btn" style="margin-right:16px;" onclick="getData()">Go
</button>
<div style="display: inline; ; justify-content: center;display:inline-flex;">
<label for="range">Range : </label>
<input type="range" style="margin-right: 16px;" min="10" max="100" value="10" id="range">
<label for="leght">Lenght : </label>
<input type="range" min="3" max="20" value="10" id="lenght">
<button class="btn" style="margin-right: 16px;" onclick="generateData()">
Random
</button>
<label for="speed">Speed : </label>
<input type="range" style="margin-right: 16px;" min="1" max="5" value="2" step="1" id="speed">
</div>
</div>
<h1 style="margin-right: 16px;">
Sorting Visualizer
</h1>
</div>
<div id="sorting-btns">
<button style="margin-top: 16px;" class="btn" id="Bubble" onclick="sortBubbleSort()">Bubble
</button>
<button style="margin-top: 16px; margin-left: 16px;margin-right: 16px;" class="btn" id="Insertion"
onclick="sortInsertionSort()">Insertion
</button>
<button style="margin-top: 16px;" class="btn" id="Quick" onclick="sortQuickSort()">Quick
</button>
<button style="margin-top: 16px;margin-right: 16px;margin-left: 16px" class="btn" id="Selection"
onclick="sortSelectionSort()">Selection
</button>
<form action="#"
style="display: inline; background-color: rgba(126, 160, 129, 0.564);padding:.75rem .5rem;border-radius: .5rem;">
<input style="background-color: transparent; color: springgreen;border-color:springgreen;" type="number"
min="1" max="10" id="searchValue" required />
<button class="btn" onclick="binarySearch()" id="binSearch">Binary Search</button>
<button class="btn" onclick="linearSearch()" id="linSearch">Linear Search</button>
<button class="btn" onclick="jumpSearch()" id="jmpSearch">Jump Search</button>
</form>
</div>
<div id="log">
</div>
<div id="containeer">
<!-- this kind of divs will be added dynamically
<div class="pole" style="height: 200px;">
<span>
4
</span>
</div> -->
</div>
<div class="card-container">
<div class="card">
<div class="card-head">
complexity</div>
<div id="complexity" class="innerCard">
<pre style="font-size: 1rem;color:mediumspringgreen;margin-top: 3rem;font-size: 1.2rem;margin-left: 32px;line-height: 30px;
">The complexity of an algorithm is a
function describing the efficiency
of the algorithm in terms
of the amount of data the algorithm
must process.</pre>
</div>
</div>
<div class="card">
<div class="card-head">
Algorithm</div>
<div id="algorithm" class="innerCard">
<!-- algo here -->
<pre style="font-size: 1rem;color:mediumspringgreen;margin-top: 1.5rem;font-size: 1.2rem;line-height: 33px;
">'a process or set of rules to be
followed in calculations or
other problem-solving operations,
especially by a computer.''
</pre>
</div>
</div>
<div class="card">
<div class="card-head">
Status</div>
<div id="status" class="innerCard">
<div id="text"></div>
<div style="display: flex; justify-content: center;align-items: center;flex: 1;">
<div class="mini-cards">
<div id="speedStatus">200</div>
<div class="card-head" style="font-size:18px;top :-45%;box-shadow:none;left:0px;">Speed
</div>
</div>
<div class="mini-cards">
<div id="rangeStatus">10</div>
<div class="card-head" style="font-size:18px;top :-45%;box-shadow:none;left:0px;">range
</div>
</div>
<div class="mini-cards">
<div id="lenghtStatus">10</div>
<div class="card-head" style="font-size:18px;top :-45%;box-shadow:none;left:0px;">size</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="./jsScripts/app.js"></script>
<script src="./jsScripts/dataGeneration.js"></script>
<script src="./jsScripts/animation.js"></script>
<script src="./jsScripts/bubbleSort.js"></script>
<script src="./jsScripts/quickSort.js"></script>
<script src="./jsScripts/insertionSort.js"></script>
<script src="./jsScripts/selectionSort.js"></script>
<script src="./jsScripts/binarySearch.js"></script>
<script src="./jsScripts/linearSearch.js"></script>
<script src="./jsScripts/jumpSearch.js"></script>
</body>
</html>