boristane / boristane/arr-sorting

Add support for introsort

Open
#20 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
JavaScript
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Sorts an array using the introsort algorithm.

```js
const arr = [2, 5, 10, 5, 32, 6];
intro(arr); // [2, 5, 5, 6, 10, 32]
intro(arr, (a, b) => b - a); // [32, 10, 6, 5, 5, 2]
```
[Reference](https://en.wikipedia.org/wiki/Introsort)

**Update README.md**.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.