-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
78 lines (70 loc) · 1.97 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Singly-Linked List</title>
<style media="screen">
h1 {
text-align: center;
}
#list {
font-size: 50px;
text-align: center;
}
ul {
list-style: none;
text-align: center;
}
li {
display: inline;
padding-right: 45px;
}
input {
display: block;
margin: 0 auto;
}
</style>
</head>
<body>
<p>
This implementation of Linked Lists has two properties: <strong>head</strong> and <strong>_length</strong>. You can use the below interface to experiment with it.
</p>
<p>
This code is running in your browser, which means changes are not permanent, if you refresh the page all data will be lost.
</p>
<p>
The left node always points to the right node. The first node is the head, the last node is the tail.
The tail node always points to null.
</p>
<p>
The Linked List can be seen below in the same syntax as an array.
</p>
<p>
You can use the input field below to choose a value to add or remove to the Linked List by clicking the respective button.
</p>
<p>
If nothing is happening when you're pressing the buttons, you either have Javascript disabled or you're getting an error thrown by the script.
<br>In that case you should open your Javascript console and check the error, they are intended.
</p>
<div id="content">
<h1>Current List</h1>
<p id="list">
</p>
<div id="actions">
<form action="index.html">
<input type="text" name="data" id="data" value="">
<ul>
<li>
<button type="button" name="addNode" id="addNode">Add Node</button>
</li>
<li>
<button type="button" name="removeNode" id="removeNode">Remove Node</button>
</li>
</ul>
</form>
</div>
</div>
<script src="LinkedList.js" charset="utf-8"></script>
<script src="script.js" charset="utf-8"></script>
</body>
</html>