摘要:
Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game, player #1 阅读全文
摘要:
When shipping goods with containers, we have to be careful not to pack some incompatible goods into the same container, or we might get ourselves in s 阅读全文
摘要:
The "travelling salesman problem" asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shor 阅读全文
摘要:
The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants. Given any two nodes in a bin 阅读全文
摘要:
In July 2004, Google posted on a giant billboard along Highway 101 in Silicon Valley (shown in the picture below) for recruitment. The content is supe 阅读全文
摘要:
给出一个布尔表达式的字符串,比如:true or false and false,表达式只包含true,false,and和or,现在要对这个表达式进行布尔求值,计算结果为真时输出true、为假时输出false,不合法的表达时输出error(比如:true true)。表达式求值是注意and 的优先 阅读全文