IntervalTree in etcd


(Pamleft) #1

I am a bit confused why the implementation of the interval tree in etcd has a similar red-black tree coloring.

in etcd/pkg/adt/interval_tree.go

type intervalNode struct {
iv IntervalValue
max Comparable
left, right *intervalNode
parent *intervalNode
c rbcolor
}


(Pamleft) #2

i’m very sorry. I think I might have misunderstood the difference between line segment tree and interval tree. And
i don’t have permission to delete the topic