Skip to content

Add support for tree sort #10

@boristane

Description

@boristane

Sorts an array using the tree sort algorithm.

const arr = [2, 5, 10, 5, 32, 6];
tree(arr); // [2, 5, 5, 6, 10, 32]
tree(arr, (a, b) => b - a); // [32, 10, 6, 5, 5, 2]

Update README.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions