red_black_tree icon indicating copy to clipboard operation
red_black_tree copied to clipboard

Add range function

Open tyre opened this issue 10 years ago • 1 comments

Add range(min, max\\nil) function to return all keys from min to max. Based on the properties of RBTrees, we should be able to find the start and end nodes in 2log(n), though rebuilding the new tree would likely take nlog(n) time.

Required for https://github.com/SenecaSystems/sorted_set/issues/7

tyre avatar Jul 19 '15 00:07 tyre

I need to be able to:

  • [ ] Navigate to a start node
  • [ ] Reduce until I reach a finish node
  • [ ] Halt reduce once that node is reached (as opposed to just no-opping through the rest of them)

tyre avatar Jul 20 '15 15:07 tyre