首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
但求八月九月好运!
亳州职业技术学院
2020届
C++工程师
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(139)
字符串最后一个单词的长度
0
class Solution { public: int lengthOfLastWord(const char *s) { int len=strlen(s); int cnt=0,i=len-1; while(i>=0&&am...
发表于 2019-06-21 20:15:51
转动链表
0
//截断重新连接的思想 class Solution { public: ListNode *rotateRight(ListNode *head, int k) { if(head==NULL||head->next==NULL) return head; ...
发表于 2019-06-20 20:46:15
求路径 ii
0
class Solution { public: int uniquePathsWithObstacles(vector<vector<int> > &obs) { int row=obs.size(); int col=obs...
发表于 2019-06-19 20:42:49
不同路径的数目(一)
1
Solution 1 class Solution { public: int hash[102][102]={0}; int uniquePaths(int m, int n) { if(m<=0||n<=0) return -1; if...
发表于 2019-06-18 20:39:36
带权值的最小路径和
0
//二维dp class Solution { public: int minPathSum(vector<vector<int> > &grid) { int dp[grid.size()][grid[0].size()]; ...
发表于 2019-06-18 20:23:25
二级制求和
0
//个人觉得转为整数较易理解 class Solution { public: string addBinary(string a, string b) { int MaxSize=max(a.size(),b.size()); int MinSi***(a....
发表于 2019-06-16 20:19:47
加一
0
class Solution { public: vector<int> plusOne(vector<int> &digits) { vector<int>ans; if(digits.size()<=0) ...
发表于 2019-06-16 19:52:35
爬楼梯
0
class Solution { public: int climbStairs(int n) { vector<int>dp(n+1); dp[0]=0; dp[1]=1; dp[2]=2; for...
发表于 2019-06-16 09:07:36
矩阵查找
0
//从左下角位置开始判断,时间复杂度为O(max(row,col)) class Solution { public: bool searchMatrix(vector<vector<int> > &matrix, int target) { ...
发表于 2019-06-15 11:25:51
排列颜色
0
class Solution { public: void sortColors(int A[], int n) { int mini=0,maxi=n-1; for(int i=0;i<=maxi;++i) { ...
发表于 2019-06-15 09:16:56
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题