上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页
摘要: Cutting an integer means to cut a K digits lone integer Z into two integers of (K/2) digits long integers A and B. For example, after cutting Z = 1673 阅读全文
posted @ 2018-08-29 13:16 ZHUQW 阅读(236) 评论(0) 推荐(0) 编辑
摘要: In the big cities, the subway systems always look so complex to the visitors. To give you some sense, the following figure shows the map of Beijing su 阅读全文
posted @ 2018-03-05 14:23 ZHUQW 阅读(206) 评论(0) 推荐(0) 编辑
摘要: Given a syntax tree (binary), you are supposed to output the corresponding infix expression, with parentheses reflecting the precedences of the operat 阅读全文
posted @ 2018-03-05 00:44 ZHUQW 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Recommendation system predicts the preference that a user would give to an item. Now you are asked to program a very simple recommendation system that 阅读全文
posted @ 2018-03-04 23:57 ZHUQW 阅读(152) 评论(0) 推荐(0) 编辑
摘要: The "eight queens puzzle" is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each other. Thus, a solutio 阅读全文
posted @ 2018-03-04 22:17 ZHUQW 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 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 ino 阅读全文
posted @ 2018-03-04 20:02 ZHUQW 阅读(325) 评论(0) 推荐(0) 编辑
摘要: In graph theory, an Eulerian path is a path in a graph which visits every edge exactly once. Similarly, an Eulerian circuit is an Eulerian path which 阅读全文
posted @ 2018-03-04 17:47 ZHUQW 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Given some segments of rope, you are supposed to chain them into one rope. Each time you may only fold two segments into loops and chain them into one 阅读全文
posted @ 2018-03-04 16:21 ZHUQW 阅读(158) 评论(0) 推荐(0) 编辑
摘要: John got a full mark on PAT. He was so happy that he decided to hold a raffle(抽奖) for his followers on Weibo -- that is, he would select winners from 阅读全文
posted @ 2018-03-04 16:08 ZHUQW 阅读(125) 评论(0) 推荐(0) 编辑
摘要: An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any 阅读全文
posted @ 2018-03-04 15:44 ZHUQW 阅读(155) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页