Giter Site home page Giter Site logo

integeralex / efficient-sorting Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 23 KB

A simple , efficient and es6 way to sort an array using quick sort and merge sort

License: Apache License 2.0

JavaScript 100.00%
codedex codescene collaborate communityexchange deepscan deepsource github gitkraken gitlens

efficient-sorting's Introduction

Efficient Sort Function in JavaScript

DeepScan grade DeepSource CodeScene Code Health NPM Downloads NPM Version

This project provides a JavaScript implementation of an efficient sorting function that dynamically determines the sorting method based on the characteristics of the input array.

Introduction

The goal of this project is to create a sorting function that intelligently selects the most suitable sorting algorithm based on the size and nature of the input array. By dynamically choosing between quicksort and mergesort, the function aims to optimize performance for different scenarios.

  • For now it only supports 1D array of any size

Installation

Install the efficient-sorting package using npm:

npm install efficient-sorting

Usage

    import Sort from 'efficient-sorting'
    let array = [10,20,45,2,1,19,17]
    console.log(Sort(array))

To use the sorting function in your JavaScript project, follow these steps:

  1. Clone the repository:

    git clone https://github.com/IntegerAlex/efficient-sorting.git

efficient-sorting's People

Contributors

deepsource-io[bot] avatar integeralex avatar

Stargazers

 avatar

Watchers

 avatar

efficient-sorting's Issues

(JS-0242) Use `const` declarations for variables that are never reassigned

Description

Variables that are never re-assigned a new value after their initial declaration should be declared with the const keyword. This prevents the programmer from erroneously re-assigning to a read-only variable, and informs those reading the code that a variable is a constant value.

Occurrences

There is 1 occurrence of this issue in the repository.

See all occurrences on DeepSource โ†’ app.deepsource.com/gh/IntegerAlex/efficient-sorting/issue/JS-0242/occurrences/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.