Building Red-Black Tree from sorted array in linear time

后端 未结 3 1688
清酒与你
清酒与你 2021-01-13 00:53

i know how to build it with n insertions ( each with O(log(n)) efficiency ) (n*log(n)) overall ,i also know that the equivalent structure of 2-3-4 tree can also be build wit

3条回答
  •  一整个雨季
    2021-01-13 01:42

    From a functional data structure perspective: there is a paper for Constructing Red-Black Trees, which discovered the pattern of continuous insertion and related it to 1-2 number system.

    It's a fun read.

提交回复
热议问题