摘要:
1113 Integer Set Partition (25 分) Given a set of NNN (>1> 1>1) positive integers, you are supposed to partition them into two disjoint sets A1A_1A1 阅读全文
摘要:
1120 Friend Numbers (20 分) Two integers are called "friend numbers" if they share the same sum of their digits, and the sum is their "friend ID". For 阅读全文
摘要:
1099 Build A Binary Search Tree (30 分) A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left 阅读全文
摘要:
1092 To Buy or Not to Buy (20 分) Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. Ther 阅读全文
摘要:
1127 ZigZagging on a Tree (30 分) Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by 阅读全文
摘要:
1155 Heap Paths (30 分) In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node 阅读全文
摘要:
1032 Sharing (25 分) To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the wo 阅读全文
摘要:
1032 Sharing (25 分) To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the wo 阅读全文
摘要:
1031 Hello World for U (20 分) Given any string of NNN (≥5\ge 5≥5) characters, you are asked to form the characters into the shape of U. For example, h 阅读全文
摘要:
1030 Travel Plan (30 分) A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are su 阅读全文