摘要:1、题目描述 Example 1: 2、解题思路: 转载:Herbert_Zero 3、示例代码:
阅读全文
09 2018 档案
摘要:题目描述 Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are+,-,*,/. Each operand may be an integer or another
阅读全文
摘要:题目描述 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
阅读全文
摘要:题目描述 请实现一个函数,将一个字符串中的每个空格替换成“%20”。例如,当字符串为We Are Happy.则经过替换之后的字符串为We%20Are%20Happy。 void replaceSpace(char *str, int length) { int spaceNum = 0; int
阅读全文
摘要:一、C风格的字符串转化为C++的string对象 C++中,string 类能够自动将C 风格的字符串转换成string 对象 #include <iostream> #include <string> using namespace std; int main() { char str[] = "
阅读全文
摘要:题目描述 在一个二维数组中(每个一维数组的长度相同),每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。 /* 思路(转自牛客网) * 矩阵是有序的,从左下角来看,向上数字递减,向右数字递增, * 因此
阅读全文
摘要:1、待排序中的元素作数组的下标或map的键值 例题:PAT甲级_1141 PAT Ranking of Institutions
阅读全文

浙公网安备 33010602011771号