跳到正文

个人记录

KD Tree

_Kyrie_约 1 分钟
原文
文章信息与版本

文章信息

发布
2021年11月30日
收录
2025年12月12日
更新
2026年11月17日
篇幅
约 1 分钟

版本

  1. v1当前

Notice:

1.When you insert a node ,you should know left part contain [l,mid)[l,mid) ,right part contain [mid,r)[mid,r) .

2.If you recycle nodes , you should make the ls or rs become 0 when you rebuild but there is no son.

3.If you just pia the biggest tree ,you should remember to change the father’s son and the rt .

Use:

1.ask for the nearist/farthest node pair

2.the sum of a area

原文
存档评论1 条抓取于