readymade-sorting-algorithms

1.0.1 • Public • Published

"# readymade-sorting-algorithms"

JavaScript Sorting Algorithms
This package provides various sorting algorithms implemented in JavaScript for sorting arrays efficiently.

Installation
You can install this package via npm:

bash
Copy code
npm install javascript-sorting-algorithms
Usage
Bubble Sort
javascript
Copy code
const { bubbleSort } = require('javascript-sorting-algorithms');

const array = [3, 1, 5, 2, 4];
bubbleSort(array);
console.log(array); // Output: [1, 2, 3, 4, 5]
Selection Sort
javascript
Copy code
const { selectionSort } = require('javascript-sorting-algorithms');

const array = [3, 1, 5, 2, 4];
selectionSort(array);
console.log(array); // Output: [1, 2, 3, 4, 5]
Insertion Sort
javascript
Copy code
const { insertionSort } = require('javascript-sorting-algorithms');

const array = [3, 1, 5, 2, 4];
insertionSort(array);
console.log(array); // Output: [1, 2, 3, 4, 5]
Merge Sort
javascript
Copy code
const { mergeSort } = require('javascript-sorting-algorithms');

const array = [3, 1, 5, 2, 4];
mergeSort(array);
console.log(array); // Output: [1, 2, 3, 4, 5]
Quick Sort
javascript
Copy code
const { quickSort } = require('javascript-sorting-algorithms');

const array = [3, 1, 5, 2, 4];
quickSort(array);
console.log(array); // Output: [1, 2, 3, 4, 5]
Cyclic Sort
javascript
Copy code
const { cyclicSort } = require('javascript-sorting-algorithms');

const array = [3, 1, 5, 2, 4];
cyclicSort(array);
console.log(array); // Output: [1, 2, 3, 4, 5]

License This package is licensed under the MIT License.

/readymade-sorting-algorithms/

    Package Sidebar

    Install

    npm i readymade-sorting-algorithms

    Weekly Downloads

    2

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    5.14 kB

    Total Files

    4

    Last publish

    Collaborators

    • vinay0410