SROMEI
SROMEI
全部文章
分类
C++(3)
题解(9)
归档
标签
去牛客网
登录
/
注册
SROMEI的脱发日记
我变秃了,也变强了
全部文章
(共12篇)
[剑指offer 编程题]二叉搜索树的后序遍历序列
class Solution { public: bool VerifySquenceOfBST(vector<int> sequence) { //二叉搜索树的后序遍历的特征,左右根 //往前找,第一个比它小的是它的左子树,第一个比它大的是它的右...
剑指offer
树
C++
C++标准库
vector
2019-10-20
0
547
[剑指offer 编程题]栈的压入、弹出序列
class Solution { public: bool IsPopOrder(vector<int> pushV,vector<int> popV) { int i=0,j=1; int length = pushV.size();...
剑指offer
C++
C++标准库
栈
vector
2019-10-20
0
684
[剑指offer 编程题] 字符串的排列
class Solution { public: vector<string> Permutation(string str) { if(str.length() == 0)return this->result; int cho...
剑指offer
C++
string
C++标准库
C++11
STL
回溯
2019-10-20
0
629
浅谈C++中的智能指针
在<memory>当中,标准库提供了两种“智能指针”来管理自由存储上的对象,分别是unique_ptr 和 shared_ptr,这两个“智能指针”最基本的作用是防止由于编程疏忽而造成的内存泄露。众所周知,定义在作用域内的对象,在作用域结束的时候</memory>
C++
智能指针
C++标准库
2019-09-21
0
511
[剑指offer 编程题]机器人的运动范围
class Solution { public: int movingCount(int threshold, int rows, int cols) { //生成一个矩阵,里面所有的值置为0为没走过,-1为走不了,1为走了的; vector<...
剑指offer
递归
C++
回溯
2019-09-21
0
870
[字节跳动 编程题]机器人跳跃问题
#include<bits/stdc++.h> using namespace std; int main(){ //简单逆推 int N = 0; while(cin >> N){ vector<int> en_li...
字节跳动
C++
2019-09-19
2
1232
[剑指offer 编程题]滑动窗口的最大值
class Solution { public: vector<int> maxInWindows(const vector<int>& num, unsigned int size) { vector<int> resul...
剑指offer
C++
STL
vector
2019-09-18
3
1013
常见C++函数罗列及详解(string篇)
一、篇前语: 作为占比最大的数据处理类型,string的处理一直困扰着无数的入门者和初学者。C++标准库中的string class其实一直做着事情是,使string能够被当作一般类型去处理而不会存在太多问题。想要进一步学习C++设计语言乃至编程,搞懂C++标准库中string里提供的全部...
C++
string
C++标准库
C++11
2019-09-17
0
942
常用C++函数罗列及详解(algorithm篇)
一、非修改性序列操作 Non-modifying sequence operations: 1) bool all_of(序列.begin(), 序列.end(), 一元检测函数) C++ 11 函数功能:*Test condition on all elements in range ...
C++
C++标准库
C++11
2019-09-17
0
645
[剑指offer 编程题]替换空格
class Solution { public: void replaceSpace(char *str,int length) { string str_2 = ""; int plus_length = 0; for(int i = 0...
剑指offer
C++
2019-09-17
0
707
首页
上一页
1
2
下一页
末页