i"ve coded red black binary statistic tree rank of arbitrary object comparable other objects in red black tree. wonder if there api class provides same functionality.
it nice if given rank, class has function return object of rank within tree.
note red-black bst allows these 2 operations in log(n) time n number of objects in tree.
the standard api doesn't have order statistic tree. treemap
in particular doesn't have methods finding rank of key, or finding key rank in o(log n) time.
it doesn't usual add-on libraries (apache commons collections, google guava) have order statistic tree, either.
Comments
Post a Comment