首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
柠檬柠檬啊
上海理工大学
2020届
测试工程师
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(5)
字符流中第一个不重复的字符
0
class Solution { public: //Insert one char from stringstream void Insert(char ch) { str += ch; m[ch]++; } //return the first appearence once ...
发表于 2019-08-14 21:34:30
最小的K个数
0
最大堆,前k个入堆,从第k+1个开始到n,如果小于堆顶,则替换掉堆顶,重新找到堆顶,再比较下一个。 class Solution { public: vector<int> GetLeastNumbers_Solution(vector<int> input, int...
发表于 2019-08-13 21:19:07
把字符串转换成整数
0
class Solution { public: int StrToInt(string str) { int length = str.size(); if (length == 0) return 0; int i = 0; while (i < ...
发表于 2019-08-12 22:40:50
扑克牌顺子
0
class Solution { public: bool IsContinuous( vector<int> numbers ) { int length = numbers.size(); if (length != 5) return false;...
发表于 2019-08-11 19:51:50
数字在升序数组中出现的次数
0
class Solution { public: int GetNumberOfK(vector<int> data, int k) { if (data.empty()) return 0; int start = 0; int end = data.size() ...
发表于 2019-08-09 20:53:42
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题