生活会辜负努力的人,但不会辜负一直努力的人

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

09 2018 档案

摘要:1、题目描述 Example 1: 2、解题思路: 转载:Herbert_Zero 3、示例代码: 阅读全文
posted @ 2018-09-25 16:08 何许亻也 阅读(204) 评论(0) 推荐(0)

摘要:题目描述 Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are+,-,*,/. Each operand may be an integer or another 阅读全文
posted @ 2018-09-16 16:39 何许亻也 阅读(237) 评论(0) 推荐(0)

摘要:题目描述 Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the neare 阅读全文
posted @ 2018-09-16 16:04 何许亻也 阅读(199) 评论(0) 推荐(0)

摘要:题目描述 请实现一个函数,将一个字符串中的每个空格替换成“%20”。例如,当字符串为We Are Happy.则经过替换之后的字符串为We%20Are%20Happy。 void replaceSpace(char *str, int length) { int spaceNum = 0; int 阅读全文
posted @ 2018-09-14 22:48 何许亻也 阅读(201) 评论(0) 推荐(0)

摘要:一、C风格的字符串转化为C++的string对象 C++中,string 类能够自动将C 风格的字符串转换成string 对象 #include <iostream> #include <string> using namespace std; int main() { char str[] = " 阅读全文
posted @ 2018-09-14 19:05 何许亻也 阅读(2801) 评论(0) 推荐(1)

摘要:题目描述 在一个二维数组中(每个一维数组的长度相同),每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。 /* 思路(转自牛客网) * 矩阵是有序的,从左下角来看,向上数字递减,向右数字递增, * 因此 阅读全文
posted @ 2018-09-14 18:43 何许亻也 阅读(184) 评论(0) 推荐(0)

摘要:1、待排序中的元素作数组的下标或map的键值 例题:PAT甲级_1141 PAT Ranking of Institutions 阅读全文
posted @ 2018-09-07 20:16 何许亻也 阅读(902) 评论(0) 推荐(0)

摘要:思路:DFS遍历 阅读全文
posted @ 2018-09-05 10:42 何许亻也 阅读(311) 评论(0) 推荐(0)