摘要: 1、介绍 C++引入了ostringstream、istringstream、stringstream这三个类,要使用他们创建对象就必须包含sstream.h头文件。 istringstream类用于执行C++风格的串流的输入操作。 ostringstream类用于执行C风格的串流的输出操作。 st 阅读全文
posted @ 2020-06-30 23:24 John_yan15 阅读(692) 评论(0) 推荐(0) 编辑
摘要: 题目: 计算逆波兰式(后缀表达式)的值 运算符仅包含"+","-","*"和"/",被操作数可能是整数或其他表达式 例如: 示例: 输入:["2", "1", "+", "3", "*"] 输出:9 代码: 1 class Solution { 2 public: 3 /** 4 * 5 * @pa 阅读全文
posted @ 2020-06-30 22:53 John_yan15 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题目: 求给定二叉树的最小深度。最小深度是指树的根结点到最近叶子结点的最短路径上结点的数量。 Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest 阅读全文
posted @ 2020-06-30 22:47 John_yan15 阅读(174) 评论(0) 推荐(0) 编辑