Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tbrowder/avl-tree
Raku implementation of an AVL tree
https://github.com/tbrowder/avl-tree
Last synced: 23 days ago
JSON representation
Raku implementation of an AVL tree
- Host: GitHub
- URL: https://github.com/tbrowder/avl-tree
- Owner: tbrowder
- License: artistic-2.0
- Created: 2019-11-14T17:12:46.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-09T16:02:09.000Z (over 1 year ago)
- Last Synced: 2024-12-09T19:50:08.109Z (about 1 month ago)
- Language: Raku
- Size: 20.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE.md
Awesome Lists containing this project
README
[![Actions Status](https://github.com/tbrowder/AVL-Tree/workflows/test/badge.svg)](https://github.com/tbrowder/AVL-Tree/actions)
AVL-Tree
========This implementation of an AVL Tree has been uploaded to [rosettacode.org](https://rosettacode.org).
It was initially a translation of the Java version on Rosetta Code. In addition to the translated code, other public methods have been added as shown by the leading asterisk in the following list of all public methods:
* insert node
* delete node
* show all node keys
* show all node balances
* *delete nodes by a list of node keys
* *find and return node objects by key
* *attach data per node
* *return list of all node keys
* *return list of all node objects
Synopsis
--------See the example in the Github repository and on Rosetta Code.
#!/usr/bin/env perl6
use AVL-Tree;
# ...create a tree and some nodes...
my $tree = AVL-Tree.new;
$tree.insert: 1;
$tree.insert: 2, :data;
$my $n = $tree.find: 2;
say $n.data;
some important tidbit of knowledgeCREDITS
=======Thanks for help from IRC `#raku` friends:
* `thundergnat` (for the idea and check of the initial version)
AUTHOR
======Tom Browder, ([email protected])
COPYRIGHT
=========& LICENSE
Copyright (c) 2019-2022 Tom Browder, all rights reserved.
This program is free software; you can redistribute it or modify it under the same terms as Raku itself with the following exception:
The code for the methods **without a leading asterisk** in the list above are covered by the GNU Free Document License 1.2.