首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
但求八月九月好运!
亳州职业技术学院
2020届
C++工程师
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(139)
二叉树中和为某一值的路径(一)
2
//DFS class Solution { public: bool seekPath(TreeNode *ptr,int cnt,int sum) { cnt+=ptr->val; if(ptr->left==nullptr&&...
发表于 2019-05-12 17:09:14
杨辉三角
0
//注意用排列组合Cn(m)则会出现数过大现象 class Solution { public: vector<vector<int> > generate(int numRows) { vector<vector<int> >...
发表于 2019-05-10 21:05:18
二叉树的三种遍历算法区别仅在于对树根、左右子树访问先后顺序的不同,这种说法()
18
感觉这种题目在玩文字游戏,会抠字眼的人我是真的服!
发表于 2019-05-10 14:03:27
买卖股票的最好时机(一)
0
//明白卖在买之后就可以 class Solution { public: int maxProfit(vector<int> &prices) { if(prices.size()<=1) return 0; int maxVal=...
发表于 2019-05-06 17:36:31
二叉树中的最大路径和
0
class Solution { int ans; public: int maxPathSum(TreeNode *root) { if(root==nullptr) return 0; ans=-10000; ...
发表于 2019-05-06 17:21:43
字符串分隔
0
#include<iostream> #include<string> #include<vector> using namespace std; void getans(vector<string>&res,string &str) ...
发表于 2019-05-05 21:09:09
计算某字符出现次数
0
#include<iostream> #include<string> using namespace std; int main() { string str; char ch; cin>>str>>ch; if(is...
发表于 2019-05-05 20:52:43
奇偶位交换
1
//略微复杂了一丝,不过时间复杂度还是可观的 /*思路: 设置两个位变量a和tempa,其中tempa=a<<1 举个例子:当x=5=0101 a从1开始,如果a&x与tempa&x的取零值不同,就说明奇数位和偶数位是不同的, 此时需要交换(如果相同则不需要处理)。 交换...
发表于 2019-05-05 11:00:39
二进制小数
1
class BinDecimal { public: string printBin(double num) { string ans="0."; double range=0.5; while(num>0) ...
发表于 2019-05-04 21:05:54
二进制插入
0
class BinInsert { public: int binInsert(int n, int m, int j, int i) { m=m<<j; return n|m; } };
发表于 2019-05-04 20:49:21
首页
上一页
4
5
6
7
8
9
10
11
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题