摘要:
liunx guide linux interface application interface system call interface library function interface linux component bootloader 引导程序(Bootloader):引导程序是管理 阅读全文
posted @ 2022-08-24 18:00
jerry-autumn
阅读(118)
评论(0)
推荐(0)
摘要:
c++基础思维导图 预备知识 变量的使用 语法变量的类型 变量名 = 初始值; 变量存在的意义在于方便我们管理内存空间 变量的类型 int float double short int long long long 常量的使用 #define 宏常量 语法: #define 常量名常量值 (通常在文 阅读全文
posted @ 2022-08-24 17:56
jerry-autumn
阅读(640)
评论(0)
推荐(0)
摘要:
数据结构与算法(第五次课) 顺序表的查找算法分析 对含有n个记录的表,查找成功的时候: ASL = 顺序查找的平均查找长度: 假设每个记录的查找概率相等: 则 顺序表的插入算法分析 算法的思想: 1.判断插入位置 i 是否合法 2.判断顺序表的存储空间是否已经满,若是满了返回error 将第n至第i 阅读全文
posted @ 2022-08-24 17:52
jerry-autumn
阅读(63)
评论(0)
推荐(0)
摘要:
知识点 树递归dfs广度优先搜索(BFS) 描述 给你二叉树的根节点 root ,返回它节点值的 前序遍历。 数据范围:二叉树的节点数量满足 0≤n≤100 0 \le n \le 100 \ 0≤n≤100 ,二叉树节点的值满足 1≤val≤100 1 \le val \le 100 \ 1≤va 阅读全文
posted @ 2022-08-22 09:54
jerry-autumn
阅读(107)
评论(0)
推荐(0)
摘要:
方法:三次翻转(推荐使用) 思路: 循环右移相当于从第mmm个位置开始,左右两部分视作整体翻转。即abcdefg右移3位efgabcd可以看成AB翻转成BA(这里小写字母看成数组元素,大写字母看成整体)。既然是翻转我们就可以用到reverse函数。 具体做法: step 1:因为mmm可能大于nnn 阅读全文
posted @ 2022-08-18 22:38
jerry-autumn
阅读(285)
评论(0)
推荐(0)
摘要:
class Solution { public: int findPeakElement(vector<int>& nums) { // write code here //题目只需要求一个峰值即可,我门可以利用二分法+一直向峰值逼近的策略 int left =0; int right = nums 阅读全文
posted @ 2022-08-18 22:24
jerry-autumn
阅读(22)
评论(0)
推荐(0)
摘要:
class Solution { public: bool Find(int target, vector<vector<int> > array) { //因为题目的属性可以知道用右上角的元素判断,如果右上角的元素 //大于target数值,就减一列,如果小于就减一行 int row = arra 阅读全文
posted @ 2022-08-18 22:05
jerry-autumn
阅读(19)
评论(0)
推荐(0)
摘要:
class Solution { public: int search(vector& nums, int target) { int len = nums.size(); if (len == 0) { //当数组为空的时候返回-1 return -1; } int left = 0, right 阅读全文
posted @ 2022-08-17 23:05
jerry-autumn
阅读(16)
评论(0)
推荐(0)
摘要:
关于python如何引用excel文件 import pandas as pd #引用pandas库,as:将pandas简写为pd Nowcoder = pd.read_excel("1.xlsx") #使用read_XXX函数,()内的是文件名. #需要注意这个python脚本和excel文件需 阅读全文
posted @ 2022-08-17 22:32
jerry-autumn
阅读(813)
评论(0)
推荐(0)
摘要:
C++的深浅复制问题 当使用浅复制的时候 #include <iostream> #include <string> using namespace std; class Person{ public: Person(){ cout <<"class 's defualt contructor ca 阅读全文
posted @ 2022-08-09 11:37
jerry-autumn
阅读(23)
评论(0)
推荐(0)
浙公网安备 33010602011771号