AVL Tree in Solidity?

npowellnpowell Posts: 2Member
I need an AVL binary tree implemented in solidity for maintaining a list of addresses sorted by a value while having a O(logn) runtime for inserts, deletes and looking up the greatest and least values. Has anyone implemented such a thing in solidity?

Also -- is there some package / library repository for useful data structures or boilerplate contracts?https://en.wikipedia.org/wiki/AVL_tree

Comments

  • npowellnpowell Posts: 2Member
    Also, if the answer is no to the AVL tree already being available, what would you charge me for implementing it, including with full coverage unit tests (I assume there's a way to unit test in Solidity)? You can use this project to help build your street cred, as I would allow you to open source the result (under something like the MIT/Apache license).
  • wb407wb407 Posts: 1Member
    Hi, I was also looking for an implementation (in Solidity) of a B-tree data structure.

    imho, this looks very promising: It's not exactly what I need, but it looks like a very nice place to start. (GPLv3)
Sign In or Register to comment.