Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add find non exact key #41

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update readme
  • Loading branch information
KanHarI committed Mar 31, 2024
commit 83fd44694b7c0dbe9edb03f20e0df8dcd95f9d1d
2 changes: 2 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Or use the compiled version 'dist/splay.js'.
- `tree.remove(key:any)` - Remove item
- `tree.find(key):Node|Null` - Return node by its key
- `tree.findStatic(key):Node|Null` - Return node by its key (doesn't re-balance the tree)
- `tree.findAtOrNeighbor(key):Node|Null` - Return node by its key or a node with a key right above or below. Useful for floating point keys, etc.
- `tree.findAtOrNeighborStatic(key):Node|Null` - Same as above, but doesn't re-balance the tree
- `tree.at(index:Number):Node|Null` - Return node by its index in sorted order of keys
- `tree.contains(key):Boolean` - Whether a node with the given key is in the tree
- `tree.forEach(function(node) {...}):Tree` In-order traversal
Expand Down