-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage10.html
137 lines (131 loc) · 2.96 KB
/
page10.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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="/Css/style.css" />
<title>Counting Sort</title>
<style>
* {
margin: 0px;
padding: 0px;
box-sizing: border-box;
}
.header {
font-size: 30px;
text-align: center;
}
#array {
background-color: rgb(185, 172, 52);
height: 450px;
width: 1500px;
margin: auto;
position: relative;
margin-top: 80px;
}
.block {
width: 23px;
background-color: #166d1d;
position: absolute;
bottom: 15px;
transition: 0.2s all ease;
}
.block2 {
width: 28px;
background-color: rgb(212, 113, 113);
position: absolute;
transition: 0.2s all ease;
}
.block_id {
position: absolute;
color: black;
margin-top: -20px;
width: 100%;
text-align: center;
}
.block_id2 {
position: absolute;
color: black;
margin-top: 22px;
width: 50%;
text-align: center;
}
.block_id3 {
position: absolute;
color: black;
margin-top: 1px;
width: 100%;
text-align: center;
}
#count {
height: 100px;
width: 1500px;
margin: auto;
}
.modal {
display: none;
position: fixed;
z-index: 1;
padding-top: 100px;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0,0.4);
}
.modal-content {
background-color: #b55ce9;
margin: auto;
padding: 20px;
font-size: larger;
border: 1px solid #888;
width: 70%;
text-align: center;
}
.close {
color: #000000;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: rgb(250, 248, 248);
text-decoration: none;
cursor: pointer;
}
</style>
</head>
<body><br/>
<p class="header">Counting Sort</p>
<button id="myBtn" style="font-size: larger; background-color: #a1eea1;">Complexity</button>
<div id="myModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<p>Worst Case Time Complexity = O(N+K)</p>
<p>Average Case Time Complexity = O(N+K)</p>
<p>Best Case Time Complexity = O(N+K)</p>
<p>Space Complexity = O(K)</p>
</div>
</div>
<script>
var modal = document.getElementById("myModal");
var btn = document.getElementById("myBtn");
var span = document.getElementsByClassName("close")[0];
btn.onclick = function() {
modal.style.display = "block";
}
span.onclick = function() {
modal.style.display = "none";
}
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>
<div id="array"></div><br/><br/>
<div id="count"></div>
<script src="/Codes/counting.js"></script>
</body>
</html>