摘要:
Problem DescriptionA binary search tree is a binary tree with root k such that any node v reachable from its left has label (v) <label (k) and any node w reachable from its right has label (w) > label (k). It is a search structure which can find a node with label x in O(n log n) average time, 阅读全文
posted @ 2012-11-05 23:26
MrMission
阅读(419)
评论(0)
推荐(0)
摘要:
Problem DescriptionA Fibonacci sequence is calculated by adding the previous two members the sequence, with the first two members being both 1.F(1) = 1, F(2) = 1, F(3) = 1,F(4) = 1, F(n>4) = F(n - 1) + F(n-2) + F(n-3) + F(n-4)Your task is to take a number as input, and print that Fibonacci number 阅读全文
posted @ 2012-11-05 10:40
MrMission
阅读(549)
评论(0)
推荐(0)