Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@amaui/binary-tree

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amaui/binary-tree

Binary tree

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

amaui logo

amaui Binary Tree

Binary Tree


MIT license     Production ready     UMD 1.9kb gzipped     100% test cov     Browser and Nodejs

Very simple code     Modern code     Junior friendly     Typescript     Made with :yellow_heart:


Getting started

Add

  // yarn
  yarn add @amaui/binary-tree

  // npm
  npm install @amaui/binary-tree

Use

  import { AmauiBinaryTree } from '@amaui/binary-tree';

  // Make a new binary tree instance
  const amauiBinaryTree = new AmauiBinaryTree();

  // Add a amaui node / value
  [4, 2, 7, 14, 1, 3, 5].map(value => amauiBinaryTree.add(value));

  // or use a make method or a static method
  amauiBinaryTree.make([4, 2, 7, 14, 1, 3, 5]);

  // Binary tree
         4
       /   \
      /     \
     2       7
    / \     / \
   1   3   5   14

  // Remove any value
  amauiBinaryTree.remove(2);

  // Binary tree
         4
       /   \
      /     \
     3       7
    /       / \
   1       5   14

Dev

Install

  yarn

Test

  yarn test

Prod

Build

  yarn build

Docs

Might be soon...

Keywords

FAQs

Package last updated on 22 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc