首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
WindedMan
华中科技大学
2021届
Java工程师
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(29)
二叉树后序遍历
2
//直接左子树加右子树加根节点输出 #include<bits/stdc++.h> using namespace std; string pos(string pre,string vin){ string res=""; if(pre.siz...
发表于 2020-02-24 12:45:19
每K个一组反转链表
0
//写的有点乱 //不过感觉这题思路没什么可取的地方 //这种题目出的没什么水平 #include<iostream> (733)#include<vector> using namespace std; struct ListNode{ int ...
发表于 2020-02-23 16:25:56
字符串变形
2
//题目不难 主要分为两步 //第一步是把字符串按照题目的要求翻转过来; //第二步就是大小写互换; class Solution { public: string trans(string s, int n) { // write code here ...
发表于 2020-02-18 20:37:21
找出指定数在数组中的范围
0
//直接用二分法 //找到之后再在附近暴力搜素 #include<iostream> using namespace std; void FindTarget(int a[],int n,int target){ int start=0,end=n-1,mid=0,t...
发表于 2020-02-17 22:15:15
中位数
0
//统计出x左边的数,右边的数,以及等于x的数 //运用数学知识,很容易求得结果 //注意,若在左边插入时,总数应该为偶数,插入的数最小 //若在右边插入时,总数应该为奇数,插入的数最小 #include<vector> #include<algorithm&...
发表于 2020-02-17 21:18:26
数组操作
0
#include<iostream> #include<vector> using namespace std; void OrderArray(vector<int> &v){ int len=v.size(); int temp=0...
发表于 2020-02-17 17:43:03
剪绳子
1
//其实和之前的一道题思维,类似 //动态规划 把问题分成很多个子问题 //并把相应的结果保存下来 int cutRope(int number) { if(number<2||number>60)return 0; if(number==...
发表于 2020-02-15 11:54:47
反转链表
0
尾插法 ListNode* ReverseList(ListNode* pHead) { ListNode*last=nullptr, *p = pHead, *temp ; while (p){ if (p->next == nullptr)l...
发表于 2019-11-03 17:12:07
有以下类定义
0
操作符++重载
发表于 2019-10-09 21:37:57
首页
上一页
1
2
3
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题