李顺利plus
李顺利plus
全部文章
分类
题解(15)
归档
标签
去牛客网
登录
/
注册
李顺利plus的博客
全部文章
(共90篇)
题解 | #数据流中的中位数#
class Solution { public: vector<double> rec; void Insert(int num) { rec.push_back(num); } double GetMedian() { ...
2022-12-31
0
206
题解 | #最小的K个数#
class Solution { public: vector<int> GetLeastNumbers_Solution(vector<int> input, int k) { if(k == 0) return {}; sort(i...
2022-12-31
0
223
题解 | #按之字形顺序打印二叉树#
class Solution { public: vector<vector<int> > Print(TreeNode* pRoot) { if(pRoot == NULL) return {}; //为空返回空 int inde...
2022-12-31
0
324
题解 | #左旋转字符串#
class Solution { public: string LeftRotateString(string str, int n) { queue<char> res; for(int i=0;i<str.length();i++){ ...
2022-12-30
0
220
题解 | #连续子数组的最大和(二)#
class Solution { public: vector<int> FindGreatestSumOfSubArray(vector<int>& array) { int max=-100,sum=0; vector<in...
2022-12-30
0
246
题解 | #二维数组中的查找#
class Solution { public: bool Find(int target, vector<vector<int> > array) { int m = array.size(); int n = array[0].si...
2022-12-30
0
194
题解 | #把数字翻译成字符串#
class Solution { public: /** * 解码 * @param nums string字符串 数字串 * @return(756076230) int整型 */ int solve(string nums) { ...
2022-12-30
0
287
题解 | #数字序列中某一位的数字#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param n int整型 * @return(756076230) int整型 ...
2022-12-28
0
233
题解 | #从上往下打印二叉树#
class Solution { public: vector<int> PrintFromTopToBottom(TreeNode* root) { if(root==NULL) return {}; vector<int> res; //存储结果 qu...
2022-12-28
0
249
题解 | #把二叉树打印成多行#
class Solution { public: vector<vector<int> > res; int max=0; //max记录树的深度 void findt(TreeNode* p,int t){ //判断树...
2022-12-28
0
236
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页