首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
但求八月九月好运!
亳州职业技术学院
2020届
C++工程师
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(139)
扑克牌顺子
1
//直接判断0的位数和所差位数的大小 class Solution { public: bool IsContinuous( vector<int> numbers ) { if(numbers.size()<5) return false; ...
发表于 2019-04-18 08:55:10
翻转单词序列
0
class Solution { public: string ReverseSentence(string str) { string res; int len=str.size(); if(len<=0) return res; ...
发表于 2019-04-17 21:10:54
左旋转字符串
1
//最简单代码,没有之一 class Solution { public: string LeftRotateString(string str, int n) { int len=str.size(); if(len<=0) return "...
发表于 2019-04-17 15:48:57
和为S的连续正数序列
1
//Force class Solution { public: vector<vector<int> > FindContinuousSequence(int sum) { vector<vector<int> >res; ...
发表于 2019-04-16 19:26:00
数组中只出现一次的数字
0
//利用lambda貌似更简洁一点 class Solution { public: void FindNumsAppearOnce(vector<int> data,int* num1,int *num2) { sort(data.begin(),data.e...
发表于 2019-04-16 18:33:24
判断是不是平衡二叉树
0
class Solution { public: bool IsBalanced_Solution(TreeNode* pRoot) { return DepthTree(pRoot)!=-1; } private: int DepthTree(TreeNod...
发表于 2019-04-16 18:16:48
第一个只出现一次的字符
1
//可以利用哈希表或者map,set class Solution { public: int FirstNotRepeatingChar(string str) { map<char,int>m; for(int i=0;i<str.siz...
发表于 2019-04-16 15:50:02
连续子数组的最大和
0
//DP动态规划,dp[i]=max(dp[i-1]+A[i],A[i])转化为if-else语句 class Solution { public: int FindGreatestSumOfSubArray(vector<int> array) { if(...
发表于 2019-04-10 21:50:06
数组中出现次数超过一半的数字
0
class Solution { public: int MoreThanHalfNum_Solution(vector<int> numbers) { if(numbers.size()<=0) return 0; int value=nu...
发表于 2019-04-10 15:41:47
链表中倒数第k个结点
1
class Solution { public: ListNode* FindKthToTail(ListNode* pListHead, unsigned int k) { int sum=0; ListNode *temp=pListHead; ...
发表于 2019-04-04 19:42:55
首页
上一页
7
8
9
10
11
12
13
14
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题