北京大學ACM比賽題目
Consider an infinite full Binary search tree (see the figure below), the numbers in the nodes are 1, 2, 3, .... In a subtree whose root node is X, we can get the minimum number in this subtree by repeating going down the left node until the last level, and we can also find the maximum number by going down the right node. Now you are given some queries as "What are the minimum and maximum numbers in the subtree whose root node is X?" Please try to find answers for there queries.
標簽:
the
Consider
infinite
numbers
上傳時間:
2013-12-16
上傳用戶:日光微瀾