首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
acman07
西安邮电大学
2018届
C++工程师
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(26)
从尾到头打印链表
0
解法一:非递归,vector+reverse class Solution { public: vector printListFromTailToHead(ListNode* head) { vector res; while(head != NULL){ ...
发表于 2017-02-22 21:04:53
包围区域
0
简单的DFS即可。 class Solution { public: void solve(vector<vector<char>>& board) { if(board.empty()) return ; ...
发表于 2017-02-10 11:27:46
钓鱼比赛
0
#include <iostream> #include <vector> #include <math.h> #include <iomanip> int n, m, x, y, t; std::vector<std::vector<f...
发表于 2017-02-08 15:18:30
裁减网格纸
0
不需要INT_MAX,INT_MIN。 #include <iostream> #include <vector> #include <utility> int num; std::vector<std::pair<int, int>>...
发表于 2017-02-08 14:14:11
小易的升级之路
0
总的来说就是小易什么怪物都能打过。 #include <iostream> #include <vector> std::vector<int> monsters; int num_monsters; int init_value; int gcd(int ...
发表于 2017-02-07 12:59:13
串的模式匹配
0
very easy solution, using KMP. class StringPattern { public: int findAppearance(string A, int lena, string B, int lenb) { if(lena <= 0...
发表于 2017-02-06 23:45:48
序列化二叉树
0
因为两个失误浪费一个小时。。 class Solution { public: char* Serialize(TreeNode *root) { std::string str; if(root != NULL) serial...
发表于 2017-01-24 14:00:49
按之字形顺序打印二叉树
66
一次性AC。 class Solution { public: vector<vector<int> > Print(TreeNode* pRoot) { vector<vector<int>> res; if...
发表于 2017-01-24 11:11:54
二叉树的下一个结点
1
开车啦。 class Solution { public: TreeLinkNode* GetNext(TreeLinkNode* pNode) { if(pNode != NULL){ TreeLinkNode* tmp = NULL; ...
发表于 2017-01-24 10:18:30
删除链表中重复的结点
1
goto一下,开车啦! class Solution { public: ListNode* deleteDuplication(ListNode* pHead) { if(pHead == NULL) return NULL; w...
发表于 2017-01-24 09:46:01
首页
上一页
1
2
3
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题