摘要:
The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of e 阅读全文
摘要:
Input our current position and a destination, an online map can recommend several paths. Now your job is to recommend two paths to your user: one is t 阅读全文
摘要:
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 阅读全文
摘要:
Given a non-empty tree with root R, and with weight Wi assigned to each tree node Ti. The weight of a path from R to L is defined to be the sum 阅读全文
摘要:
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only nodes 阅读全文
摘要:
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 阅读全文
摘要:
1044 Shopping in Mars(25 分) Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Ma 阅读全文
摘要:
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 阅读全文
摘要:
When register on a social network, you are always asked to specify your hobbies in order to find some potential friends with the same hobbies. A socia 阅读全文
摘要:
The following is from Max Howell @twitter: Google: 90% of our engineers use the software you wrote (Homebrew), but you can't invert a binary tree on a 阅读全文