原创 1149 Dangerous Goods Packaging (25 分)(cj)

1149 Dangerous Goods Packaging (25 分) When shipping goods with containers, we have to be careful not to pack some incom

原创 1148 Werewolf - Simple Version (20 分)

  1148 Werewolf - Simple Version (20 分) Werewolf(狼人殺) is a game in which the players are partitioned into two parties:

原创 1135 Is It A Red-Black Tree (30 分)(cj)

1135 Is It A Red-Black Tree (30 分) There is a kind of balanced binary search tree named red-black tree in the data stru

原创 1145 Hashing - Average Search Time (25 分)(cj)

1145 Hashing - Average Search Time (25 分) The task of this problem is simple: insert a sequence of distinct positive in

原创 1137 Final Grading (25 分)(cj)

1137 Final Grading (25 分) For a student taking the online course "Data Structures" on China University MOOC (http://www

原创 1144 The Missing Number (20 分)(cj)

1144 The Missing Number (20 分) Given N integers, you are supposed to find the smallest positive integer that is NOT in

原创 1140 Look-and-say Sequence (20 分)(cj)

1140 Look-and-say Sequence (20 分) Look-and-say sequence is a sequence of integers as the following: D, D1, D111, D113,

原创 1143 Lowest Common Ancestor (30 分)(cj)

1143 Lowest Common Ancestor (30 分) The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node

原创 1136 A Delayed Palindrome (20 分)(cj)

1136 A Delayed Palindrome (20 分) Consider a positive integer N written in standard notation with k+1 digits a​i​​ as a​

原创 1142 Maximal Clique (25 分)(cj)

1142 Maximal Clique (25 分) A clique is a subset of vertices of an undirected graph such that every two distinct vertice

原创 1115 Counting Nodes in a BST(30 分)(cj)

1115 Counting Nodes in a BST(30 分) A Binary Search Tree (BST) is recursively defined as a binary tree which has the fol

原创 1124 Raffle for Weibo Followers(20 分)(cj)

1124 Raffle for Weibo Followers(20 分) John got a full mark on PAT. He was so happy that he decided to hold a raffle(抽獎)

原创 1133 Splitting A Linked List (25 分)(cj)

1133 Splitting A Linked List (25 分) Given a singly linked list, you are supposed to rearrange its elements so that all

原创 1125 Chain the Ropes(25 分)(cj)

1125 Chain the Ropes(25 分) Given some segments of rope, you are supposed to chain them into one rope. Each time you may

原创 1128 N Queens Puzzle(20 分)(cj)

1128 N Queens Puzzle(20 分) The "eight queens puzzle" is the problem of placing eight chess queens on an 8×8 chessboard