自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

code farmer from sust

find . -name "*.bug" -print0 | xargs -0 rm

  • 博客(43)
  • 收藏
  • 关注

原创 【C】排序算法之冒泡排序

通用冒泡排序 qsort、冒泡排序优化

2021-01-03 16:22:35 672 4

原创 【C】常用的宏实现

MAX or MIN

2019-09-08 20:58:56 814

原创 【Linux】编写 Makefile

c & cpp Makefile

2019-08-21 22:29:40 218

原创 【Linux】vimtutor

vimtutor

2018-10-21 20:48:58 1150

原创 【Linux】静态库与动态库的制作

目录静态库的制作及使用步骤动态库的制作及使用步骤1. 静态库的制作及使用步骤1.1 生成与地址有关的 .o 文件# gcc -c *.c -o *.oeg: gcc -c calc.c -o calc.o1.2 生成静态库# ar -cr lib库名.a *.oeg: ar -cr libcalc.a *.o1.3使用静态库# gcc test.c -o test -L./lib -l库名 (ps: 库名通过 “掐头去尾留中央” 的方式获取)eg:.

2018-09-17 11:19:19 212

原创 【数据结构】浅析时间复杂度与空间复杂度

衡量算法效率的标准:时间复杂度和空间复杂度。 通俗地来讲,时间复杂度就是一个程序要被执行的次数,它是一个近似值,而不是执行的时间。空间复杂度,是程序执行过程中所占用的最大内存。 接下来通过两段代码来说明下如何计算一个程序的时间复杂度以及空间复杂度:int SumMemory(int n) // 时间复杂度:共执行2n+5次,用大O表示法记为O(n);空间复杂度:4n+12字节,用大O表示法...

2018-06-07 20:10:50 881

原创 【C】库函数之 atoi

Convert string to integer# include <stdlib.h>int atoi (const char * str); Parses the C-string str interpreting its content as an integral number, which is returned as a value of type int. Th...

2018-05-22 17:59:01 771

原创 【C】深入浅出之函数栈帧

函数栈帧、反汇编

2018-05-02 09:09:46 2162 6

原创 【C】判断当前系统是大端还是小端

1、大小端介绍 实际上,大小端指的是数据在内存中的存储模式。大端字节序(存储模式):一个数据的低位字节序的内容存放在高地址处,而高位字节序的内容存放在低地址处。小端字节序(存储模式):一个数据的高位字节序的内容存放在高地址处,而低位字节序的内容存放在低地址处。2、判断当前系统是大端还是小端 int a = 1; 假设有一个数字为 a = 1,分别画出 a 在大端和小端两种情况下的内存分布。a...

2018-04-30 21:11:08 8505 4

原创 【C】浅析 #define 宏和函数的区别

1. 执行速度(效率);2. 调试的难易程度;3. 是否会增加代码长度;4. 是否可以传入参数类型;5. 是否带来副作用。

2018-04-30 15:13:35 17748

原创 【C】库函数之 sqrt

二分法、牛顿迭代法

2018-04-10 20:10:16 3157

原创 【C】折半(二分)查找

折半查找也称为二分查找,是一种在有序数组中查找某一特定元素的搜索算法。其优点是查找速度快,缺点是所要查找的数据必须在有序序列中。1、基本思想假设有一个升序排列的数组 arr,在该数组中查找元素 key。首先找出该数组中最中间的元素,然后将最中间的元素mid 与所要查找的元素 key 进行比较,如果相等则返回该元素的下标。如果 mid > key,那么在 mid 左边的区间去查找...

2018-03-28 23:45:41 5474 2

原创 【数据结构】位图

位图

2022-10-07 19:50:50 118 1

原创 【数据结构】堆

2022-10-06 19:14:38 109

原创 【数据结构】二叉搜索树

二叉搜索树

2022-10-05 00:05:53 89

原创 【数据结构】二叉树

二叉树

2022-10-04 12:19:57 49

原创 【数据结构】动态顺序表

动态顺序表

2022-10-03 17:49:25 41

原创 【数据结构】静态顺序表

静态顺序表

2022-10-03 16:48:55 37

原创 【数据结构】哈希

哈希表和哈希桶的实现

2022-10-02 18:00:08 42

原创 【数据结构】带有头节点的双向循环链表

带有头节点的双向循环链表

2022-09-18 16:59:37 80

原创 【数据结构】链式队列

链式队列

2022-09-12 14:42:31 39

原创 【数据结构】顺序栈

实现简单的顺序栈

2022-09-11 22:33:58 49

原创 【数据结构】不带头节点的单链表

不带头节点的单链表

2022-09-11 17:05:23 93

原创 【数据结构】七大排序算法

快速排序、合并排序、冒泡排序、选择排序、插入排序、希尔排序、堆排序。

2020-09-19 16:37:03 214

原创 fio_generate_plots

fio_generate_plots、gnuplot

2020-05-11 11:27:39 1488

原创 【Linux】进程间关系和守护进程

终端终端是所有输入/输出设备的总称,如 字符终端、伪终端、图形终端、网络终端等。在 UNIX 系统中,用户通过终端登录系统后得到一个 Shell 进程,这个终端称为 Shell 进程的控制终端。简单来说,一个 Linux 系统启动,大概需要经历以下步骤:init --->fork ---> exec ---> getty ---> login ---&...

2018-09-17 11:26:56 229

原创 【Linux】进程的调度算法

1. 先来先服务算法;2. 短进程优先算法;3. 最高响应比优先算法;4.时间片轮转算法;5. 多级反馈队列算法

2018-07-17 15:22:59 1146

原创 【C】库函数之 strncmp

目录1. Compare characters of two strings2. 源代码3. 输出结果1. Compare characters of two strings#include <string.h>int strncmp ( const char * str1, const char * str2, size_t num );Compares up tonumcharacters of the C stringstr1to those of t...

2018-05-17 19:27:11 489

原创 【C】库函数之 strncat

目录1. Append characters from string2. 源代码3. 输出结果1. Append characters from string#include <string.h>char * strncat ( char * destination, const char * source, size_t num );Appends the firstnumcharacters ofsourcetodestination, plus a ...

2018-05-17 19:19:29 256

原创 【C】库函数之 strncpy

目录1. Copy characters from string2. 源代码3. 输出结果1. Copy characters from string#include <string.h>char * strncpy ( char * destination, const char * source, size_t num );Copies the firstnumcharacters ofsourcetodestination. If the end o...

2018-05-17 19:11:12 279

原创 【C】库函数之 memmove

目录1. Move block of memory2. 源代码3. 输出结果1. Move block of memory#include <string.h>void * memmove ( void * destination, const void * source, size_t num );Copies the values of num bytes from the location pointed by source to the memory blo

2018-05-17 19:02:21 235

原创 【C】库函数之 memcpy

目录1. Copy block of memory2. 源代码3. 输出结果1. Copy block of memory#include <string.h>void * memcpy ( void * destination, const void * source, size_t num );Copies the values of num bytes from the location pointed to by source directly to the

2018-05-17 18:52:07 258

原创 【C】库函数之 strchr

目录1. Locate first occurrence of character in string2. 源代码3. 输出结果1. Locate first occurrence of character in string#include <string.h>char * strchr ( const char * str, int character );Returns a pointer to the first occurrence ofcharacte.

2018-05-17 18:42:40 169

原创 【C】库函数之 strcmp

1. Compare two strings#include <string.h>int strcmp ( const char * str1, const char * str2 );Compares the C stringstr1to the C stringstr2.This function starts comparing the first character of each string. If they are equal to each other...

2018-05-17 18:24:51 567

原创 【C】深入浅出之指针

1.指针数组;2.数组指针;3.函数指针;4. 函数指针数组;5. 函数指针的数组的指针。

2018-05-03 15:11:31 197

原创 【C】库函数之 strstr

目录1. Locate substring2. 算法分析3. 源代码4. 输出结果1. Locate substring#include <string.h>char * strstr ( const char * str1, const char * str2 );Returns a pointer to the first occurrence of str2 in str1, or a null pointer if str2 is not part of

2018-05-03 14:07:45 239

原创 【C】库函数之 pow

目录1. Raise to power2. 两种实现2.1递归2.2 迭代3. 测试函数4. 输出结果1. Raise to power#include <math.h>double pow(double base, double exponent);Returnsbaseraised to the powerexponent:base ^ exponent以上是cplusplus 对 pow 函数的介绍,可以看出该函数用来计算 ba...

2018-04-25 19:26:48 1396

原创 【C】库函数之 strlen

Get string length # include &lt;string.h&gt; Returns the length of the C string. The length of a C string is determined by the terminating null-character: A c string is as long as the number of cha...

2018-04-20 14:27:02 855

原创 【C】库函数之 strcat

Concatenate strings# include &lt;string.h&gt; Appends a copy of the source string to the destination string. The terminating null character indestinationis overwritten by the first character of sou...

2018-04-20 13:37:40 243

原创 【C】库函数之 strcpy

Copy string # include &lt;string.h&gt; Copies the C string pointed by source into the array pointed by destination, including the terminating null character (and stopping at that point). To avoid o...

2018-04-20 11:13:36 312

空空如也

空空如也

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

TA关注的人

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