首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
课程
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
在线笔面试、雇主品牌宣传
登录
/
注册
tendance
获赞
6
粉丝
1
关注
16
看过 TA
70
男
长沙理工大学
2024
C工程师
IP属地:湖南
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑tendance吗?
发布(32)
刷题
tendance
2022-07-15 14:52
长沙理工大学 数学类
题解 | #字符串的排列#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param str string字符串 * @return string字符串vector */ void recursion(vector<string>&res,string& str,vector<int>&vis,string &tmp) { if(tmp.size()==str....
0
点赞
评论
收藏
分享
tendance
2022-07-12 09:54
长沙理工大学 数学类
题解 | #判断是不是完全二叉树#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * }; */ class Solution { public: bool isCompleteTree(TreeNode* root) { queue<TreeNode*>q; bool flag = false;...
0
点赞
评论
收藏
分享
tendance
2022-07-12 08:12
长沙理工大学 数学类
题解 | #二叉树的镜像#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * }; */ class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param pRoot TreeNode类 ...
0
点赞
评论
收藏
分享
tendance
2022-07-10 13:58
长沙理工大学 数学类
题解 | #矩阵的最小路径和#
class Solution { public: /** * * @param matrix int整型vector<vector<>> the matrix * @return int整型 */ int minPathSum(vector<vector<int> >& matrix) { // write code here int n = matrix.size(); int m = matrix[0].size(); ...
0
点赞
评论
收藏
分享
tendance
2022-07-10 11:55
长沙理工大学 数学类
题解 | #最长公共子串#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * longest common substring * @param str1 string字符串 the string * @param str2 string字符串 the string * @return string字符串 */ string LCS(string str1, string str2) { // write code here ...
0
点赞
评论
收藏
分享
tendance
2022-07-09 08:08
长沙理工大学 数学类
题解 | #合并二叉树#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { public: /** * * @param t1 TreeNode类 * @param t2 TreeNode类 * @return TreeNode类 */ TreeNode* mergeTrees(TreeNode* t1, TreeNode* t2) { ...
0
点赞
评论
收藏
分享
tendance
2022-07-09 07:45
长沙理工大学 数学类
题解 | #按之字形顺序打印二叉树#
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } }; */ class Solution { public: vector<vector<int> > Print(TreeNode* pRoot) { vector<vector<int>>res; ...
0
点赞
评论
收藏
分享
tendance
2022-07-08 08:46
长沙理工大学 数学类
题解 | #缺失的第一个正整数#
class Solution { public: int minNumberDisappeared(vector<int>& nums) { // write code here unordered_map<int,int>mp; int i =1;//找到第一个整数 for(auto x:nums) { ++mp[x];//记录每个整数出现的次数 } while(mp[i])//当一个正整数出现的次数位0的时候,即...
0
点赞
评论
收藏
分享
tendance
2022-07-08 08:28
长沙理工大学 数学类
题解 | #两数之和#
class Solution { public: /** * * @param numbers int整型vector * @param target int整型 * @return int整型vector */ vector<int> twoSum(vector<int>& numbers, int target) { // write code here vector<int>res; int n = numbers.size(...
0
点赞
评论
收藏
分享
tendance
2022-07-07 10:52
长沙理工大学 数学类
题解 | #不同路径的数目(一)#
class Solution { public: /** * * @param m int整型 * @param n int整型 * @return int整型 */ int uniquePaths(int m, int n) { // write code here int a[100][100]; for(int i =0;i<m;i++) { a[i][0]=1; } for(int i ...
0
点赞
评论
收藏
分享
tendance
2022-07-07 10:51
长沙理工大学 数学类
题解 | #不同路径的数目(一)#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param array int整型vector * @return int整型vector */ vector<int> FindNumsAppearOnce(vector<int>& array) { // write code here sort(array.begin(),array.end());...
0
点赞
评论
收藏
分享
tendance
2022-07-06 19:15
长沙理工大学 数学类
题解 | #二叉树的中序遍历#
class Solution { public: void inorder(vector<int>&res,TreeNode*root) { if(root == NULL) { return ; } inorder(res,root->left);//先遍历左边的节点 res.push_back(root->val);//再遍历中间的节点 inorder(res,root->right);//最后遍历右边的节点 ...
0
点赞
评论
收藏
分享
tendance
2022-07-06 17:58
长沙理工大学 数学类
题解 | #二叉树的前序遍历#
class Solution { public: void preorder(vector<int>&res,TreeNode*root)//需要传引用的地方 { if(root == NULL) { return; } res.push_back(root->val); preorder(res,root->left); preorder(res,root->right); } vector<in...
0
点赞
评论
收藏
分享
tendance
2022-07-05 20:29
长沙理工大学 数学类
项目学习开始
2022-07-05
在牛客打卡2天,今天学习:刷题 3 道/代码提交 11 次
每日监督打卡
0
点赞
评论
收藏
分享
tendance
2022-07-05 12:15
长沙理工大学 数学类
题解 | #寻找峰值#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型vector * @return int整型 */ int findPeakElement(vector<int>& nums) { // write code here int res; if(nums[0]>nums[1]) { ...
0
点赞
评论
收藏
分享
1
2
3
工具箱
TA的圈子
暂未加入圈子
TA的圈子
TA的笔记
暂无笔记
TA的笔记
登录
0
天
已登录
0
天
连续登录
0
人
今日访客
牛客网
牛客企业服务