Notice how the highlighted region shrinks at each step. The algorithm never examines points outside the narrowing window. In a balanced tree with nnn points, this takes about log4(n)\log_4(n)log4(n) steps. For a million points, that's roughly 10 steps instead of a million comparisons.
"I do think that we have a site which may be an early religious community."
,推荐阅读搜狗输入法2026获取更多信息
scientificamerican.com
// 从后向前扫描,大于key的元素后移