会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
钟齐峰的博客
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
10
···
12
下一页
2022年2月2日
五种排序算法之--堆排序
摘要: 一、部分概念 满二叉树:深度为k,且含有(2^k)-1个节点的二叉树。 完全二叉树:深度为k,又n个结点,当且仅当其每一个结点都与深度为k的满二叉树中编号从1至n的节点一一对应时,称为完全二叉树。 堆的结构可以分为大根堆和小根堆,是一个完全二叉树。 每个节点的值都大于其左孩子和又孩子节点的值,称之为
阅读全文
posted @ 2022-02-02 13:31 钟齐峰
阅读(122)
评论(0)
推荐(0)
2021年12月14日
FreeSWITCH 1.10.7 编译(debian 11)
摘要: 1、安装预备库 更新源:deb https://security.debian.org/debian-security bullseye-security main non-free contribapt install -y build-essential gdb gnupg2 wget auto
阅读全文
posted @ 2021-12-14 16:19 钟齐峰
阅读(1053)
评论(0)
推荐(0)
2021年11月30日
C++读写图片文件
摘要: 1、C方式 string sourcefilename = "D:\\Logo.jpg"; string destfilename="D:\\Logo1.jpg"; FILE* fp; if ( (fp=fopen(sourcefilename.c_str(), "rb" ))==NULL ) {
阅读全文
posted @ 2021-11-30 12:53 钟齐峰
阅读(1264)
评论(0)
推荐(0)
2021年11月16日
STL中的隐性性能开销与副作用
摘要: 1 隐性性能开销 1.1 STL容器的clear的时间复杂度不是O(1) 很多人潜意识认为STL容器中clear()成员函数的时间复杂度为常量时间复杂度O(1)。原因是大家觉得对于vector而言,clear()之后,修改了size()的结果,不影响capacity()的结果,因而得出clear()
阅读全文
posted @ 2021-11-16 14:08 钟齐峰
阅读(995)
评论(0)
推荐(0)
2021年10月9日
makefile 编译多个目标
摘要: 1、静态库libtools.a源码 libtools.h #ifndef tools_h_ #define tools_h_ int sub(int x,int y); int mul(int x,int y); #endif libtools.cpp #include"libtools.h" in
阅读全文
posted @ 2021-10-09 15:37 钟齐峰
阅读(217)
评论(0)
推荐(0)
2021年9月10日
WebAssembly编译
摘要: 环境:centos 7.9 1、准备环境 sudo yum install docker sudo systemctl start docker.service sudo docker pull trzeci/emscripten:latest 2、编写C++源文件 //main.cpp #incl
阅读全文
posted @ 2021-09-10 13:42 钟齐峰
阅读(403)
评论(0)
推荐(0)
2021年8月31日
gcc 11.2 在线升级
摘要: 环境:centos 7 1、准备开发环境 $ yum groupinstall "Development Tools" $ yum install glibc-static libstdc++-static 2、下载源码 wget http://ftp.gnu.org/gnu/gcc/gcc-11.
阅读全文
posted @ 2021-08-31 09:52 钟齐峰
阅读(803)
评论(0)
推荐(0)
2021年8月30日
glibc-2.18升级
摘要: 1、下载文件下载地址:https://mirrors.tuna.tsinghua.edu.cn/gnu/glibc/glibc-2.18.tar.gz 2、安装部署解压tar -zxvf glibc-2.18.tar.gz 创建编译目录cd glibc-2.18 mkdir build 编译、安装c
阅读全文
posted @ 2021-08-30 13:00 钟齐峰
阅读(1365)
评论(0)
推荐(1)
2021年8月27日
WebAssembly环境搭建
摘要: Environment:Ubuntu 16.06 + emscripten URL: https://emscripten.org/docs/getting_started/downloads.html#linux 1. Installation emsdk # Get the emsdk repo
阅读全文
posted @ 2021-08-27 09:44 钟齐峰
阅读(587)
评论(0)
推荐(0)
2021年8月14日
栈和队列
摘要: 1、栈和队列 栈和队列都是以deque为底层容器的适配器。栈(stack)、队列(queue)、优先队列(priority_queue)这三种数据结构,准确的来说其实是一种适配器,因为底层都是以其他容器为基准。 栈:先入后出,只允许在栈顶添加和删除元素,称为入栈和出栈。 队列:先入先出,载队首取元素
阅读全文
posted @ 2021-08-14 20:38 钟齐峰
阅读(198)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
10
···
12
下一页
公告