- 博客(2)
- 资源 (2)
- 收藏
- 关注
原创 Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are+,-,*
class Solution {public: int evalRPN(vector<string> &tokens) { if(tokens.size() == 0) return 0; stack<int> num_stack; for(int i = 0; i < t...
2019-04-21 23:17:45 92
原创 Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the short
两两种方式:广度优先和深度优先class Solution {private: public: int run(TreeNode *root) { if (nullptr == root) return 0; int level = 1; queu...
2019-04-21 23:10:52 127
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人