原创 1115 Counting Nodes in a BST (30point(s)) - C語言 PAT 甲級

1115 Counting Nodes in a BST (30point(s)) A Binary Search Tree (BST) is recursively defined as a binary tree which

原创 1106 Lowest Price in Supply Chain (25point(s)) - C語言 PAT 甲級

1106 Lowest Price in Supply Chain (25point(s)) A supply chain is a network of retailers(零售商), distributors(經銷商), an

原创 1109 Group Photo (25point(s)) - C語言 PAT 甲級

1109 Group Photo (25point(s)) Formation is very important when taking a group photo. Given the rules of forming K r

原创 1108 Finding Average (20point(s)) - C語言 PAT 甲級

1108 Finding Average (20point(s)) The basic task is simple: given N real numbers, you are supposed to calculate the

原创 1105 Spiral Matrix (25point(s)) - C語言 PAT 甲級

1105 Spiral Matrix (25point(s)) This time your job is to fill a sequence of N positive integers into a spiral matri

原创 1102 Invert a Binary Tree (25point(s)) - C語言 PAT 甲級

1102 Invert a Binary Tree (25point(s)) The following is from Max Howell @twitter: Google: 90% of our engineers use

原创 1119 Pre- and Post-order Traversals (30point(s)) - C語言 PAT 甲級

1119 Pre- and Post-order Traversals (30point(s)) Suppose that all the keys in a binary tree are distinct positive i

原创 1107 Social Clusters (30point(s)) - C語言 PAT 甲級

1107 Social Clusters (30point(s)) When register on a social network, you are always asked to specify your hobbies i

原创 1101 Quick Sort (25point(s)) - C語言 PAT 甲級

1101 Quick Sort (25point(s)) 1101 Quick Sort (25point(s)) There is a classical process named partition in the famou

原创 1104 Sum of Number Segments (20point(s)) - C語言 PAT 甲級

1104 Sum of Number Segments (20point(s)) Given a sequence of positive numbers, a segment is defined to be a consecu

原创 1112 Stucked Keyboard (20point(s)) - C語言 PAT 甲級

1112 Stucked Keyboard (20point(s)) On a broken keyboard, some of the keys are always stucked. So when you type some

原创 1116 Come on! Let‘s C (20point(s)) - C語言 PAT 甲級

1116 Come on! Let’s C (20point(s)) “Let’s C” is a popular and fun programming contest hosted by the College of Comp

原创 1111 Online Map (30point(s)) - C語言 PAT 甲級

1111 Online Map (30point(s)) Input our current position and a destination, an online map can recommend several path

原创 1122 Hamiltonian Cycle (25point(s)) - C語言 PAT 甲級

1122 Hamiltonian Cycle (25point(s)) The “Hamilton cycle problem” is to find a simple cycle that contains every vert

原创 1121 Damn Single (25point(s)) - C語言 PAT 甲級

1121 Damn Single (25point(s)) “Damn Single (單身狗)” is the Chinese nickname for someone who is being single. You are