summaryrefslogtreecommitdiff
path: root/licenses
diff options
context:
space:
mode:
authorwiz <wiz>2007-04-21 10:20:05 +0000
committerwiz <wiz>2007-04-21 10:20:05 +0000
commit49feff6d167a8162dbf1e7bcd256840362060963 (patch)
treeb8e814d4e40cc1fec861fb34334a755ed66412c6 /licenses
parent8863d63f716f452a44dd4769e60764ad0a3abb19 (diff)
downloadpkgsrc-49feff6d167a8162dbf1e7bcd256840362060963.tar.gz
Initial import of ruby-rbtree-0.2.0:
RBTree is a sorted associative collection using Red-Black Tree as the internal data structure. The elements of RBTree are ordered and the interface is the almost same as Hash, so simply you can consider RBTree sorted Hash. Red-Black Tree is a kind of binary tree that automatically balances by itself when a node is inserted or deleted. Thus the complexity for insert, search and delete is O(log N) in expected and worst case. On the other hand the complexity of Hash is O(1). Because Hash is unordered the data structure is more effective than Red-Black Tree as an associative collection. The interface of RBTree is the almost same as Hash although there are some limitations.
Diffstat (limited to 'licenses')
0 files changed, 0 insertions, 0 deletions