Files
CSCI-1200/animations/doubly_lists/insert/index.html
2023-09-11 21:11:17 -04:00

25 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Doubly-Linked List: insert operation</title>
<script src="../../konva.js"></script>
</head>
<body>
<h1>Doubly-Linked List: insert operation</h1>
<p>This animation shows the insert operation in Doubly-Linked List. Click the "next step" button to run the animation. <b>Note:</b> in this animation, we will insert a new node containing the value 15 following the node containing the value 1. </p>
<div id="container"></div>
<script src="insert.js"></script>
<!-- we must include the javascript first, and then have this button definition which calls a function defined in the javascript -->
<button onclick="list_insert_nextstep()" style="position: absolute; top: 125px; left: 10px;">next step</button>
<button onclick="hide_next()" style="position: absolute; top: 125px; left: 110px;">hide next pointers</button>
<button onclick="show_next()" style="position: absolute; top: 125px; left: 250px;">show next pointers</button>
<button onclick="hide_prev()" style="position: absolute; top: 125px; left: 390px;">hide prev pointers</button>
<button onclick="show_prev()" style="position: absolute; top: 125px; left: 530px;">show prev pointers</button>
</body>
</html>