@bemoje/arr-bubble-sort

    1.1.1 • Public • Published

    @bemoje/arr-bubble-sort

    Sort array by bubbling up bigger values to the right side. Runtime: O(n^2)

    Version

    NPM version

    Travis CI

    dependencies

    Dependencies

    dependencies

    Stats

    NPM downloads Forks

    Donate

    Buy Me A Beer donate button PayPal donate button

    Installation

    npm install @bemoje/arr-bubble-sort
    npm install --save @bemoje/arr-bubble-sort
    npm install --save-dev @bemoje/arr-bubble-sort

    Usage

    import arrBubbleSort from '@bemoje/arr-bubble-sort'
    
    arrBubbleSort([2, 1, 3])
    //=> [1, 2, 3]
    
    arrBubbleSort(['b', 'a', 'c'])
    //=> ['a', 'b', 'c']

    Tests

    Uses Jest to test module functionality. Run tests to get coverage details.

    npm run test

    API

    arrBubbleSort

    Sort array by bubbling up bigger values to the right side. Runtime: O(n^2)

    Parameters
    • arr Array The array of elements to be sorted
    Returns

    Array

    Install

    npm i @bemoje/arr-bubble-sort

    DownloadsWeekly Downloads

    4

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    8.28 kB

    Total Files

    5

    Last publish

    Collaborators

    • bemoje