this is simple package to implementation alogrithm sorting in javascript
Use NPM
npm install sorting-js
Use CDN
<script
src="https://unpkg.com/[email protected]/dist/bundle.js"
type="module"
></script>
Node.JS
const {bubble_sort} = require("sorting-js");
const res = bubble_sort([1, 2, 1, 2, 5, 6, 5, 3, 5, 57, 86]);
console.log(res);
Browser
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sorting JS</title>
</head>
<body>
<script
src="https://unpkg.com/[email protected]/dist/bundle.js"
type="module"
></script>
<script type="module">
import {insertion_sort} from "./bundle.js";
const res = insertion_sort([2, 3, 4, 5, 6, 4, 3, 4]);
console.log(res);
</script>
</body>
</html>
- Fork and Clone this repository
- Make changes
- Create test case
- Push and create Pull Request
- Bubble Sort(✔)
- Insertion Sort(✔)
- Selection Sort(✔)
- Merge Sort(✔)
- Shell Sort(✔)
- Cycle Sort(✔)
- Radix Sort(✔)
Akwan Maroso