摘要:
Nothing to hard to think. Just take care of boundary conditions.class Solution {public: string convert(string s, int nRows) { if(s.empty() |... 阅读全文
摘要:
Two passes: all pointer linking info will be recorded in 1st pass - to hashmap; 2nd pass recover the pointer relationship from hashmap.1A!class Soluti... 阅读全文
摘要:
Another textbook problem. We take back of postorder array as the current root, and then we can split the inorder array: 1st half for current right chi... 阅读全文
摘要:
A collegiate textbook problem. Nothing special, but just take care of your memory use.class Solution {public: TreeNode *_buildTree(int pre[], int &... 阅读全文