The event started with the President and CEO of The Pokémon Company recalling how there were only 151 Pokémon when Pokémon Red and Green were released. Now, there are 1,025 Pokémon.
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.,详情可参考51吃瓜
,这一点在夫子中也有详细论述
习题链接:LeetCode 1019. 链表中的下一个更大节点
Living in Australia? Try the Guardian Australia’s daily sports newsletter,更多细节参见safew官方版本下载