首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
nbgao
杭州电子科技大学
2022届
Java工程师
Studying & Thinking
关注
私信
加入黑名单
举报TA
TA的博客
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(1058)
二叉树根节点到叶子节点的所有路径和
1
class Solution { public: int sumNumbers(TreeNode *root) { int S=0; if(root == NULL) return S; return sum(root, S); ...
发表于 2017-09-09 00:57:34
恢复二叉搜索树
2
class Solution { public: TreeNode *pre,*a,*b; void recoverTree(TreeNode *root) { pre = a = b = NULL; DFS(root); if(a &...
发表于 2017-09-08 01:51:46
数字字符串转化成IP地址
13
class Solution { public: vector<string> restoreIpAddresses(string s) { vector<string> result; string t; DFS(resul...
发表于 2017-09-08 01:38:55
链表的插入排序
1
class Solution { public: ListNode *insertionSortList(ListNode *head) { if(head==NULL || head->next==NULL) return head; ...
发表于 2017-09-07 00:59:00
两数之和
2
class Solution { public: vector<int> twoSum(vector<int> &numbers, int target) { int n = numbers.size(); vector<...
发表于 2017-09-07 00:38:34
链表中的节点每k个一组翻转
0
class Solution { public: ListNode *reverseKGroup(ListNode *head, int k) { if(head == NULL) return NULL; ListNode *p = hea...
发表于 2017-09-06 00:57:45
最小覆盖子串
6
class Solution { public: string minWindow(string S, string T) { string result; map<char,int>t,s; for(auto c:T) ...
发表于 2017-09-05 01:58:33
不在数组里的最小正整数
6
class Solution { public: int firstMissingPositive(int A[], int n) { for(int i=0;i<n;i++) { int x = A[i]; whil...
发表于 2017-09-05 01:47:44
正则表达式匹配
1
class Solution { public: bool isMatch(const char *s, const char *p) { int l1 = strlen(s); int l2 = strlen(p); bool dp[l1+1...
发表于 2017-09-04 01:42:20
两数相除
1
class Solution { public: int divide(int dividend, int divisor) { if(divisor == 0) return INT_MAX; long long result=0,fla...
发表于 2017-09-04 01:15:11
首页
上一页
93
94
95
96
97
98
99
100
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题