@codinasion/heap-sort
v1.0.2
Published
Typescript implementation of heap sort algorithm
Downloads
3
Maintainers
Readme
@codinasion/heap-sort
Typescript implementation of heap sort algorithm.
Installation
# if you're using pnpm
pnpm add @codinasion/heap-sort
# or, if you're using npm
npm install @codinasion/heap-sort
# or, if you're using yarn
yarn add @codinasion/heap-sort
Usage
import { HeapSort } from "@codinasion/heap-sort";
const arr = [1, 4, 7, 2, 5, 8, 3, 6, 9];
const sortedArr = HeapSort(arr);
console.log(sortedArr); // [1, 2, 3, 4, 5, 6, 7, 8, 9]