自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 资源 (1)
  • 收藏
  • 关注

原创 c++ vector 源码架构

迭代器继承关系:using _Iterator_base = _Iterator_base12;class _Vector_const_iterator : public _Iterator_baseclass _Vector_iterator : public _Vector_const_iterator<_Myvec>using iterator = ...

2019-04-18 22:44:04 622

原创 c++ list 容器源码架构

using _Mybase = _List_buy<_Ty, _Alloc>;using iterator = typename _Mybase::iterator;迭代器迭代器类 :_List_unchecked_const_iterator 、 _List_unchecked_iterator 、 List_const_iterator、class _List_iter...

2019-04-18 21:38:54 403

原创 python csv

#coding:utf-8import csvdata=[["w","a",1], ["l","o",2], ["z","h",3]]file_name="data/meinian.csv"fd=open(file_name,"w+",newline='')writer=csv.writer(fd)for dd in data:

2018-04-17 16:40:03 116

转载 树的遍历

前言在前两篇文章二叉树和二叉搜索树中已经涉及到了二叉树的三种遍历。递归写法,只要理解思想,几行代码。可是非递归写法却很不容易。这里特地总结下,透彻解析它们的非递归写法。其中,中序遍历的非递归写法最简单,后序遍历最难。我们的讨论基础是这样的:    [cpp] view plain copy//Binary Tree Node  

2017-12-14 10:41:04 192

原创 KMP NEXT数组的求解

#include#includevoid Next(const char ss[],int next[]){    int q;    int k=-1;    int m = strlen(ss);    next[0] = -1;    next[1]=0;    for (q = 2; q     {        while(k > -1 &&

2017-12-14 10:18:17 382

原创 杂项二

#includeusing namespace std;int MaxLen(int arr[],int k ,int length){   int left=0;   int right=0;   int sum=arr[0];   int res=0;   while(right        if(sum==k){            if(res 

2017-12-09 10:38:17 112

原创 杂项1

#include#includeusing namespace std;int s(int arr[],int i,int j);int f(int arr[],int i,int j){    if(i==j) return arr[i];    return max(arr[i]+s(arr,i+1,j),arr[j]+s(arr,i,j-1));}int s(

2017-12-08 18:25:13 103

原创 堆排序

#include#includeusing namespace std;//////构造大顶堆,时间复杂度O(logn)void make_maxheap(int a[],int start,int end1){    int f=start;    int s=2*f+1;    while(s        if(( (s+1)            s++

2017-11-17 09:12:35 119

原创 磁盘驱动

扇区->块(电梯算法)->文件->文件系统

2017-11-01 10:46:36 392

原创 最长递增子序列

#include#include#includeusing namespace std;vectorget(vector&abc){     int len=abc.size();     vector dp(len);     vector  res(len);     dp[0]=abc[0];     res[0]=1;     int right=0

2017-10-30 11:45:01 134

原创 汉诺塔

#includeusing namespace std;void move(int n ,char x,char y,char z){   if(1==n)   {       cout"   }   else   {       move(n-1,x,z,y);       cout"       move(n-1,y,x,z);   

2017-10-08 11:23:29 142

原创 main函数之前做的工作

程序在main函数之前做的一些工作   glibc的程序入口_start 。下面是i386的实现代码_start:xor1 %ebp,%ebp  //代码首先实现的是让ebp寄存器清零。这样做的目的是当前是程序的最外层函数(ebp=0)。             popl  %esi  //在调用_start 之前装载器把用户的参数和环境变量压到栈中。栈顶的元素为argc。接下来是ar

2017-08-30 19:53:46 185

原创 中断的上下文切换和任务调度的上下文切换

linux内核分析学习笔记中断是在同一个进程的上下文中(在中断函数中可能产生进程上下文切换)  而进程上下文切换时在两个进程之间进行切换中断的执行过程1.内核把当前eip esp等压到内核堆栈里面去 然后把eip的内容放到中断函数开始处产生中断。 int指令会在堆栈(内核堆 栈)上保存一些寄存器的值(用户态栈顶地址,当时的状态字,当时的eip的值)。然后把 cs:eip(中断服

2017-08-23 09:05:33 2743

leveldb.pyd python3.6

将文件(编译好的pyd文件)解压后复制到 python库文件中 ,可以直接用

2018-04-20

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除