Nexium

Sortings

Unlock the Power of Sortings Algorithms with Nexium's Essential Methods

Import the NSort

const { NSort } = require('nexium')

bubbleSort

bubble sort algorithm

const arr = [5, 2, 9, 1, 5, 6]
const result = NSort.bubbleSort(arr) // [1, 2, 5, 5, 6, 9]

quickSort

quick sort algorithm

const arr = [5, 2, 9, 1, 5, 6]
const result = NSort.quickSort(arr) // [1, 2, 5, 5, 6, 9]

On this page