@simontiger/

SortingAlgorithmsImproved

HTML, CSS, JS

Visualizing various sorting algorithms.

fork
loading
Files
  • index.html
  • script.js
  • style.css

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.5970475968992359","path":"index.html","file":{"path":"index.html","content":{"asEncoding":{"base64":"PCFET0NUWVBFIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPG1ldGEgY2hhcnNldD0idXRmLTgiPgogICAgPG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCI+CiAgICA8dGl0bGU+cmVwbC5pdDwvdGl0bGU+CiAgICA8bGluayBocmVmPSJzdHlsZS5jc3MiIHJlbD0ic3R5bGVzaGVldCIgdHlwZT0idGV4dC9jc3MiIC8+CiAgPC9oZWFkPgogIDxib2R5PgogICAgPHNjcmlwdCBzcmM9InNjcmlwdC5qcyI+PC9zY3JpcHQ+CiAgICA8aDE+U29ydGluZyBWaXN1YWxpemF0aW9uPC9oMT4KICAgIDxwIGlkPSJzdGF0cyI+CiAgICAgIEFsZ29yaXRobTogPHNlbGVjdCBpZD0iYWxnb3JpdGhtIj4KICAgICAgICA8b3B0aW9uPkluc2VydGlvbiBTb3J0PC9vcHRpb24+CiAgICAgICAgPG9wdGlvbj5TZWxlY3Rpb24gU29ydDwvb3B0aW9uPgogICAgICAgIDxvcHRpb24+QnViYmxlIFNvcnQ8L29wdGlvbj48L3NlbGVjdD4gPGJyLz4KICAgICAgIyBvZiBDb21wYXJpc29uczogPHNwYW4gaWQ9ImNvbXBhcmlzb25zIj4wPC9zcGFuPiA8YnIvPgogICAgICAjIG9mIFN3YXBzOiA8c3BhbiBpZD0ic3dhcHMiPjA8L3NwYW4+IDxici8+CiAgICAgIDxidXR0b24gaWQ9InJlc2V0Ij5SZXNldCBBbGdvcml0aG08L2J1dHRvbj4KICAgIDwvcD4KICAgIDxkaXYgaWQ9ImNvbnRhaW5lciI+PC9kaXY+CiAgPC9ib2R5Pgo8L2h0bWw+"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>repl.it</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <script src="script.js"></script>
    <h1>Sorting Visualization</h1>
    <p id="stats">
      Algorithm: <select id="algorithm">
        <option>Insertion Sort</option>
        <option>Selection Sort</option>
        <option>Bubble Sort</option></select> <br/>
      # of Comparisons: <span id="comparisons">0</span> <br/>
      # of Swaps: <span id="swaps">0</span> <br/>
      <button id="reset">Reset Algorithm</button>
    </p>
    <div id="container"></div>
  </body>
</html>
result
console