首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
碗碗
山东大学
2016届
C++工程师
热爱互联网
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(42)
判断是不是平衡二叉树
0
class Solution { public: int depthTree(TreeNode *pRoot){ if(pRoot==NULL){ return 0; } int left = depthTree(pRo...
发表于 2015-06-23 11:09:37
整数中1出现的次数(从1到n整数中1出现的次数)
0
class Solution { public: int NumberOf1Between1AndN_Solution(int n){ int count=0; int m=0; int k=0; for(int i=1;i&l...
发表于 2015-06-23 08:47:22
翻转单词序列
0
class Solution { public: string ReverseSentence(string str) { if(str.size()==0){ return str; } string strTmp; ...
发表于 2015-06-20 19:48:50
34的17次方 对6取余, 结果是多少?
3
34^17%6 = ((34%6)^17)%6 = 4^17%6 = 4 可以先对34%6求余,得到4 然后是4^17%6 求余, 得到4
发表于 2015-06-15 07:18:59
不用加减乘除做加法
0
class Solution { public: int Add(int num1, int num2) { int sum ; int carry; do{ sum = num1^num2; ...
发表于 2015-06-14 17:50:10
把数组排成最小的数
73
class Solution { public: static bool compare( const string &st1,const string &st2){ string s1 = st1+st2; string s2 = st2+s...
发表于 2015-06-14 17:36:35
二叉搜索树的后序遍历序列
0
class Solution { public: bool VerifySquenceOfBST(vector<int> sequence) { if(sequence.empty()){ return false; } ...
发表于 2015-06-14 16:06:49
复杂链表的复制
1
/* struct RandomListNode { int label; struct RandomListNode *next, *random; RandomListNode(int x) : label(x), next(NULL), rand...
发表于 2015-06-14 12:28:41
栈的压入、弹出序列
0
class Solution { public: bool IsPopOrder(vector<int> pushV,vector<int> popV) { if(pushV.size()==0&&popV.size()==0){ ...
发表于 2015-06-14 11:05:22
包含min函数的栈
0
class Solution { public: void push(int value) { m_data.push(value); if(m_min.size()==0||m_min.top()>value){ m_min.p...
发表于 2015-06-13 21:02:56
首页
上一页
1
2
3
4
5
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题