摘要: ```C++ /* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } };*/ class Solution { public: vector PrintFromTop... 阅读全文
posted @ 2018-08-26 17:34 一条图图犬 阅读(181) 评论(0) 推荐(0) 编辑
摘要: ```C++ class Solution { private: vector vec; public: void push(int value) { vec.emplace_back(value); } void pop() { if(vec.empty()) return; vec.erase(vec.end()-... 阅读全文
posted @ 2018-08-26 16:46 一条图图犬 阅读(78) 评论(0) 推荐(0) 编辑
摘要: ```C++ struct TreeNode { int val; TreeNode* left; TreeNode* right; explicit TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} }; void trimLeftTrailingSpaces(string &input) ... 阅读全文
posted @ 2018-08-26 15:47 一条图图犬 阅读(880) 评论(0) 推荐(0) 编辑