数据结构
文章平均质量分 75
缇欧酱^0^
这个作者很懒,什么都没留下…
展开
-
Integer Set Partition
Given a set of N (> 1) positive integers, you are supposed to partition them into two disjoint sets A1 and A2 of n1 and n2 numbers, respectively. Let S1 and S2 denote the sums of all the numbers in原创 2016-12-05 16:57:23 · 305 阅读 · 0 评论 -
Family Property
This time, you are supposed to help us collect the data for family-owned property. Given each person's family members, and the estate(房产)info under his/her own name, we need to know the size of each f原创 2016-12-04 21:08:45 · 225 阅读 · 0 评论 -
Counting Nodes in a BST
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only nodes with keys less than or equal to the node's ke原创 2016-12-03 20:27:47 · 288 阅读 · 0 评论 -
Come on! Let's C
"Let's C" is a popular and fun programming contest hosted by the College of Computer Science and Technology, Zhejiang University. Since the idea of the contest is for fun, the award rules are funny as原创 2016-12-03 20:24:44 · 380 阅读 · 0 评论 -
Eddington Number
British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum integer E such that it is for E原创 2016-12-03 20:19:30 · 233 阅读 · 0 评论 -
Birds in Forest
Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in the same picture belong to the same tree. You are supposed to help the scientists to count the maxi原创 2016-12-03 20:10:47 · 246 阅读 · 0 评论 -
Pre- and Post-order Traversals
Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and inorder traversal sequences, or preorder and inorder原创 2016-12-03 19:49:13 · 327 阅读 · 0 评论