<commit_before># avl-tree-adt [![Build Status](https://travis-ci.org/pasangsherpa/avl-tree-adt.svg?branch=master)](https://travis-ci.org/pasangsherpa/avl-tree-adt)

> AVL Tree ADT for browser and nodejs


## Install

Download the [production version][min] or the [development version][max].

[min]: https://raw.githubusercontent.com/pasangsherpa/avl-tree-adt/master/dist/avl-tree-adt.min.js
[max]: https://raw.githubusercontent.com/pasangsherpa/avl-tree-adt/master/dist/avl-tree-adt.js

```sh
$ npm install --save avl-tree-adt
```

```sh
$ bower install --save avl-tree-adt
```


## Usage

```js
var AVLTree = require('avl-tree-adt');
var avlTree = new AVLTree();

```
```js
<script type="text/javascript" src="https://raw.githubusercontent.com/pasangsherpa/avl-tree-adt/master/dist/avl-tree-adt.min.js"></script>
<script type="text/javascript"> 
  var avlTree = new AVLTree();

</script>
```


## Documentation

### AVLTree()

Creates an empty avl-tree with infinite capacity.


## License

[MIT](http://opensource.org/licenses/MIT) © [<NAME>](https://github.com/pasangsherpa)<commit_msg>documentation updated<commit_after># avl-tree-adt [![Build Status](https://travis-ci.org/pasangsherpa/avl-tree-adt.svg?branch=master)](https://travis-ci.org/pasangsherpa/avl-tree-adt)

> AVL Tree ADT for browser and nodejs


## Install

Download the [production version][min] or the [development version][max].

[min]: https://raw.githubusercontent.com/pasangsherpa/avl-tree-adt/master/dist/avl-tree-adt.min.js
[max]: https://raw.githubusercontent.com/pasangsherpa/avl-tree-adt/master/dist/avl-tree-adt.js

```sh
$ npm install --save avl-tree-adt
```

```sh
$ bower install --save avl-tree-adt
```


## Usage

```js
var AVLTree = require('avl-tree-adt');
var avlTree = new AVLTree();

```
```js
<script type="text/javascript" src="https://raw.githubusercontent.com/pasangsherpa/avl-tree-adt/master/dist/avl-tree-adt.min.js"></script>
<script type="text/javascript"> 
  var avlTree = new AVLTree();

</script>
```

## Documentation

### AVLTree()

Create an empty tree with.

### Methods

#### .add(element)

Add an element to tree.

##### element

Type: `object`

the element to be added to the tree.

#### .remove(element) `throws "No such element" error` 

Remove an element from the tree and return the element.

##### element

Type: `object`

the element to be removed from the tree.

#### .getRoot()

Returns the root of the tree.

Type: `object`

the root of the tree

#### .find(element) `throws "No such element" error` 

Find an element from the tree and return the element.

##### element

Type: `object`

the specified element.

#### .isEmpty()

Returns true if this tree contains no elements.

Type: `boolean`

whether or not the tree is empty.

#### .size()

Returns the number of elements in the tree.

Type: `int`

the number of element in the tree.

## License

[MIT](http://opensource.org/licenses/MIT) © [<NAME>](https://github.com/pasangsherpa)
{'fraction_non_alphanumeric': 0.17276422764227642, 'fraction_numerical': 0.0, 'mean_word_length': 4.320720720720721, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1807300', 'n_tokens_mistral': 1075, 'n_tokens_neox': 1059, 'n_words': 249}