首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
nbgao
杭州电子科技大学
2022届
Java工程师
Studying & Thinking
关注
私信
加入黑名单
举报TA
TA的博客
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(1058)
把字符串转换成整数
1
class Solution { public: int StrToInt(string str) { int start = 0; int n=str.length(), sign=1; long long r = 0; if...
发表于 2018-04-26 09:22:39
不用加减乘除做加法
1
class Solution { public: int Add(int num1, int num2) { while(num2!=0){ int S = num1^num2; int C = (num1&nu...
发表于 2018-04-25 01:01:26
求1+2+3+...+n
1
class Solution { public: int Sum_Solution(int n) { int r = n; r && (r += Sum_Solution(n-1)); return r; } };
发表于 2018-04-25 00:47:24
孩子们的游戏(圆圈中最后剩下的数)
1
class Solution { public: int LastRemaining_Solution(int n, int m) { if(n==0) return -1; if(n==1) retur...
发表于 2018-04-24 10:48:52
扑克牌顺子
1
class Solution { public: bool IsContinuous( vector<int> numbers ) { if(numbers.empty()) return false; int zero =...
发表于 2018-04-23 00:48:38
翻转单词序列
1
class Solution { public: string ReverseSentence(string str) { string r="", word=""; for(int i=0;i<str.lengt...
发表于 2018-04-22 01:32:47
左旋转字符串
1
class Solution { public: string LeftRotateString(string str, int n) { if(n==0 || str=="") return str; int k ...
发表于 2018-04-21 01:28:45
和为S的两个数字
1
class Solution { public: vector<int> FindNumbersWithSum(vector<int> array,int sum) { vector<int> v; int n=array....
发表于 2018-04-20 01:30:56
和为S的连续正数序列
1
class Solution { public: vector<vector<int> > FindContinuousSequence(int sum) { vector<vector<int> > result; ...
发表于 2018-04-19 00:58:20
数组中只出现一次的数字
1
class Solution { public: void FindNumsAppearOnce(vector<int> data,int* num1,int *num2) { if(data.empty()) return; ...
发表于 2018-04-17 14:44:17
首页
上一页
66
67
68
69
70
71
72
73
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题