ypqhappy
ypqhappy
全部文章
分类
数据结构学习(17)
生活(2)
题目知识点(2)
题解(41)
归档
标签
去牛客网
登录
/
注册
ypqhappy的博客
就决定是你啦!
全部文章
(共7篇)
题解 | #挑7#C++
写一个判断函数核心就是取余、除以 #include<iostream> using namespace std; bool ifSev(int num) { while(num > 0) { if (num % 10 == 7) { ...
研究生就业备战
C++
数组
2021-09-12
18
860
题解 | #合并表记录#C++
一个数组记录出现的键一个无序map记录键对应的值的累计 #include<iostream> #include<vector> #include<unordered_map> #include<algorithm> using namespace st...
C++
数组
哈希
2021-09-12
10
671
题解 | #明明的随机数#C++
第一个循环完成多个样例第二个循环完成每个样例下的多个数字一个数组、一个集合sort一下,轮番输出 #include<iostream> #include<vector> #include<set> #include<algorithm> using n...
C++
数组
2021-09-12
1
492
题解 | #旋转数组的最小数字#C++二分
class Solution { public: int minNumberInRotateArray(vector<int> rotateArray) { // 整体思路:二分法确定拐点位置 int len = rotateArray.size(...
数组
C++
2021-08-24
0
459
题解 | #数字颠倒# C++
#include <iostream> using namespace std; int main () { int m; cin >> m; while(m != 0) { cout << m % 10; ...
字符串
数组
2021-04-14
1
514
最小的几个数:先快排,再传给给新数组,返回
class Solution { public: int getStandard(vector<int>& array, int low, int high) { int key = array[low]; while(low &l...
数组
2021-04-03
0
494
12.25&27 数组
数组内都是相同类型的 定长的线性表 数组特点:结构固定——维数和维界不变 初始化、销毁、取元素、修改元素值,一般不做插入和删除操作 一般都是采用顺序存储结构 (要解决将多维关系映射到一维关系的问题) 三维:页、行、列 ...
研究生就业备战
数组
2020-12-27
0
395