摘要:
Note: The following idea is in fact from the last answer inthis link, which leads to a clean code. I just reorganize it and add some explanations. I h... 阅读全文
摘要:
Well, an interesting problem. If you draw some examples on a white board and try to figure out the regularities, you may have noticed that the key to ... 阅读全文
摘要:
Well, since we need to make a deep copy of the list and nodes in the list have arandom pointer that may point to any node in the list (or NULL), we ne... 阅读全文
摘要:
Problem DescriptionGiven a string, find the length of the longest substring T that contains at most 2 distinct characters.For example, Given s =“eceba... 阅读全文
摘要:
The key to this problem is to identify all the words that can be added to a line and then identify the places that require an additional space (to mak... 阅读全文