Skip to content
AVL tree and Red-black tree in Ruby
Find file
Latest commit ec1463c @nahi Version bump to 1.2.1

AVL tree, Red-black tree in Ruby

avl_tree - AVL tree, Red-black tree and Lock-free Red black tree in Ruby Copyright (C) 2014 Hiroshi Nakamura


You can use AVLTree, RedBlackTree or ConcurrentRedBlackTree just as a replacement of Hash.

@points =
@points[score] = person
@points.each do |score, person|


require 'avl_tree'
@points =

require 'red_black_tree'
@points =
@points =

AVLTree and RedBlackTree are faster but not thread-safe. Use ConcurrentRedBlackTree in multi-thread environment.


Name:: Hiroshi Nakamura E-mail:: Project web site::


This program is copyrighted free software by Hiroshi Nakamura. You can redistribute it and/or modify it under the same terms of Ruby's license; either the dual license version in 2003, or any later version.

Something went wrong with that request. Please try again.