跪求要一个offer
跪求要一个offer
全部文章
分类
题解(178)
归档
标签
去牛客网
登录
/
注册
跪求要一个offer的博客
TA的专栏
12篇文章
0人订阅
算法和编程题解
12篇文章
275人学习
全部文章
(共183篇)
题解 | #获取三个数中的最大值(三元表达式实现)#
using namespace std; int main() { int a, b, c; cin >> a; cin >> b; cin >> c; int i,j,t; int shu[3]={a,...
C++
2021-12-23
0
324
题解 | #数组中只出现一次的两个数字#
public: int FirstNotRepeatingChar(string str) { int flag=-1; //使用c++中的hash map实现 unordered_map<char, int> mp; ...
C++
2021-12-23
0
301
题解 | #数组中只出现一次的两个数字#
public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param array int整型vector * @return int整型vector */ vec...
C++
2021-12-22
0
372
题解 | #数组中只出现一次的两个数字#
public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param array int整型vector * @return int整型vector */ vec...
C++
2021-12-20
0
331
题解 | #求1+2+3+...+n#
class Solution { public: int Sum_Solution(int n) { //使用求和公式 long result=(1+n)*n/2; return result; } };
C++
2021-12-20
0
286
题解 | #打印从1到最大的n位数#
public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param n int整型 最大位数 * @return int整型vector */ vector<...
C++
2021-12-18
0
373
题解 | #最小的K个数#
public: vector<int> GetLeastNumbers_Solution(vector<int> input, int k) { vector<int> result; sort(input.begin(),...
C++
2021-12-18
0
311
题解 | #不用加减乘除做加法#
public: int Add(int num1, int num2) { while(num1>0){ num1--; num2++; } wh...
C++
2021-12-17
0
301
题解 | #二维数组中的查找#
public: bool Find(int target, vector<vector<int> > array) { int i,j; int flag=false; for(i=0;i<array.size()...
C++
2021-12-14
0
317
题解 | #数组中重复的数字#
public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param numbers int整型vector * @return int整型 */ int dup...
C++
2021-12-14
0
446
首页
上一页
3
4
5
6
7
8
9
10
11
12
下一页
末页