adding the stack animation

This commit is contained in:
Jidong Xiao
2025-03-09 21:33:05 -04:00
committed by JamesFlare1212
parent c26e4f8fc3
commit 4a88689106
2 changed files with 627 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Valid Parentheses</title>
<script src="../../konva.js"></script>
</head>
<body>
<h1>Valid Parentheses</h1>
<p>This animation shows if parentheses entered are valid using stack</p>
<button onclick="case1()">Case 1: "()"</button>
<button onclick="case2()">Case 2: "()[]{}"</button>
<button onclick="case3()">Case 3: "(]"</button>
<button onclick="case4()">Case 4: "([])"</button>
<button onclick="case5()">Case 4: "{[([])]}"</button>
<div id="container"></div>
<script src="stack.js"></script>
</body>
</html>