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

BSTree - inorderTraversal from specific starting point #18

Open
aguynamedben opened this issue Jan 23, 2019 · 2 comments
Open

BSTree - inorderTraversal from specific starting point #18

aguynamedben opened this issue Jan 23, 2019 · 2 comments

Comments

@aguynamedben
Copy link

Hi, this library is awesome thanks for the work you put into it.

We’re using BSTree to index domain names from documents. We can use inorderTraversal to traverse documents by our custom domain ranking.

Is there a way to inorderTraverse from a specific starting point? (vs. traversing the whole tree). It seems like some other trees provide this and maybe it could be fairly straightforward to implement in BSTree.

Use case: we want to get all docs for a certain domain (I.e. trello.com) without traversing the entire tree.

@xpusostomos
Copy link

I agree, the whole point of a btree is you can jump to somewhere and then start traversing.

@parhamsaremi
Copy link

#23
i added this feature by updating the signature to inorderTrverse(callback, element = undefined)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants