摘要:
Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social n... 阅读全文
摘要:
This time let us consider the situation in the movie "Live and Let Die" in which James Bond, the world's most famous spy, was captured by a group of d... 阅读全文
摘要:
For a given undirected graph with N vertices and E edges, please list all the connected components by both DFS and BFS. Assume that all the vertices a... 阅读全文
摘要:
In 1953, David A. Huffman published his paper "A Method for the Construction of Minimum-Redundancy Codes", and hence printed his name in the history o... 阅读全文
摘要:
We have a network of computers and a list of bi-directional connections. Each of these connections allows a file transfer from one computer to another... 阅读全文
摘要:
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... 阅读全文
摘要:
An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the... 阅读全文
摘要:
Given a tree, you are supposed to list all the leaves in the order of top down, and left to right.Input Specification:Each input file contains one tes... 阅读全文