Фото: Kevin Dietsch / Getty Images
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.
,更多细节参见同城约会
「像鬼一樣工作」:台灣外籍移工為何陷入「強迫勞動」處境,推荐阅读同城约会获取更多信息
Виктория Кондратьева (Редактор отдела «Мир»)