-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
170 lines (161 loc) · 7.21 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!DOCTYPE html>
<html lang="en">
<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">
<title>Ds & Algo Visualizer</title>
<link rel="stylesheet" href="shared.css">
<link rel="stylesheet" href="style.css">
<style>
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropdown-content a {
float: none;
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: #ddd;
}
.show {
display: block;
}
</style>
</head>
<body>
<header>
<div class="main-header">
<a href="index.html" class="main-header__home">
Home
</a>
<nav class="main-nav">
<ul class="main-nav__items">
<li class="main-nav__item">
<a href="/Visualizer/About/about.html">About</a>
</li>
<li class="main-nav__item">
<a href="https://github.com/chhetri28/Visualizer">Github</a>
</li>
<li class="main-nav__item main-nav__item--cta">
<!-- <a href="Visualizer/index.html">Visualizer</a> -->
<div class="dropdown">
<button class="dropbtn" onclick="myFunction()"> Visualizer <i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content" id="myDropdown">
<a href="Visualizer/Projects/js_stack/index.html">Stack</a>
<a href="#">Queue</a>
<a href="#">Dequeue</a>
</div>
</div>
</li>
</ul>
</nav>
</div>
</header>
<main>
<section id="Namesec">
<h1>Data Structure Visualizer</h1>
</section>
<section class="DS">
<div class="entry-content">
<header class="entry-header">Stack Data Structure</header>
<article class="content">
<p>Stack is a linear data structure which follows a particular order in which the operations are
performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out)</p>
<p class="images">
<img src="/Visualizer/images/stack.png">
</p>
<p>There are many real-life examples of a stack. Consider an example of plates stacked over one
another in the canteen. The plate which is at the top is the first one to be removed, i.e. the
plate which has been placed at the bottommost position remains in the stack for the longest
period of time. So, it can be simply seen to follow LIFO(Last In First Out)/FILO(First In Last
Out) order.
</p>
<div class="operations">
<h1> Push</h1>
<h1> Peek</h1>
<h1> Pop</h1>
<h1> Isempty</h1>
</div>
<div>
<a href="Visualizer/Projects/js_stack/index.html">Click here to see Stack in Action</a>
</div>
</article>
</div>
<div class="entry-content">
<header class="entry-header">Queue Data Structure</header>
<article class="content">
<p>Stack is a linear data structure which follows a particular order in which the operations are
performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out)</p>
<p>
<img src="">
</p>
<p>There are many real-life examples of a stack. Consider an example of plates stacked over one
another in the canteen. The plate which is at the top is the first one to be removed, i.e. the
plate which has been placed at the bottommost position remains in the stack for the longest
period of time. So, it can be simply seen to follow LIFO(Last In First Out)/FILO(First In Last
Out) order.</p>
<div>
<a href="">Click here</a>
</div>
</article>
</div>
<div class="entry-content">
<header class="entry-header">Dequeue Data Structure</header>
<article class="content">
<p>Stack is a linear data structure which follows a particular order in which the operations are
performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out)</p>
<p>
<img src="">
</p>
<p>There are many real-life examples of a stack. Consider an example of plates stacked over one
another in the canteen. The plate which is at the top is the first one to be removed, i.e. the
plate which has been placed at the bottommost position remains in the stack for the longest
period of time. So, it can be simply seen to follow LIFO(Last In First Out)/FILO(First In Last
Out) order.</p>
<div>
<a href="">Click here</a>
</div>
</article>
</div>
</section>
</main>
<footer class="main-footer">
<nav>
<p class="footer-heart">
Made with <g-emoji class="g-emoji" alias="heart"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2764.png">
<img class="emoji" alt="heart" height="20" width="20"
src="https://github.githubassets.com/images/icons/emoji/unicode/2764.png">
</g-emoji> by Chhetri</a>
</p>
</nav>
</footer>
<script>
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function myFunction() {
document.getElementById("myDropdown").classList.toggle("show");
}
// Close the dropdown if the user clicks outside of it
window.onclick = function (e) {
if (!e.target.matches('.dropbtn')) {
var myDropdown = document.getElementById("myDropdown");
if (myDropdown.classList.contains('show')) {
myDropdown.classList.remove('show');
}
}
}
</script>
</body>
</html>