摘要:Really interesting O(n) problem. Just like playing.. so actually working on algorithm problems is like playing games!class Solution {public: int ma...
阅读全文
12 2014 档案
摘要:One TopCoder article introduces a very interesting alternative solution to Longest Common Sequences problem.It is based on this statement (http://comm...
阅读全文
摘要:Binary Tree *-order traversal by recursion is trivial. But their iteration version deserves a look:Pre-Orderclass Solution { vector ret;public: ...
阅读全文
摘要:没什么难的,提示已经说得很明白了。HihoCoder目前还不支持C++11,囧..#include #include #include #include #include #include using namespace std;//struct Node{ Node(char rc) : c...
阅读全文