《算法导论(第4版)》阅读笔记:p162-p163

《算法导论(第4版)》学习第 28 天,p162-p163 总结,总计 2 页。

一、技术总结

1. heap sort

(1) (binary) heap(堆/二叉堆)

(2)complete binary tree(完全二叉树)

(3)max-heap(最大堆)

定义:A[PARENT(i)] ≥ A[i]。

看了很多定义,不得不说还是这个定义最简洁,准确。

(4)min-heap(最小堆)

定义:A[PARENT(i)] ≤ A[i]。

2. bitwise operation

(1)shift(移位)

On most computers, the LEFT procedure can compute 2i in one instruction by simply shifting the binary representation of i left by one bit position. Similarly, the RIGHT procedure can quickly compute 2i + 1 by shifting the binary representation of i left by one bit position and then adding 1. The PARENT procedure can compute ⌊i/2⌋ by shifting i right one bit position.

看到这一段的时候突然懵了,不是说索引运算吗?怎么突然就扯到位移了(bit)?原来乘以 2 等于该数的二进制表示左移一位,除以 2 等于右移一位(注:这里的移位是逻辑移位)。看来以前学的很多东西因为长期不运用都忘了。

二、英语总结(生词:1)

1. point

(1)up to a point

idom. to a limited degree, to some extent(到一定程度,一定程度上)

示例:The tree is completely filled on all levels except possibly the lowest, which is filled from the left up to a point(《算法导论(第4版)》第 161 页)。

上面这句话的意思是:这个树除了最底层可能不是完全填满的,其它层都是完全填满的,最底层从左到右依次填充至某个点。

"up to a point"在这里想表达"最底层的结点从左到右填充到一定程度"。

关于英语的注解同步更新汇总到 https://github.com/codists/English-In-CS-Books 仓库。

三、其它

今天没有什么想说的。

四、参考资料

1. 编程

(1) Thomas H. Cormen,Charles E. Leiserson,Ronald L. Rivest,Clifford Stein,https://book.douban.com/subject/35591269/

2. 英语

(1) Etymology Dictionary:https://www.etymonline.com

(2) Cambridge Dictionary:https://dictionary.cambridge.org

欢迎搜索及关注:编程人(a_codists)

相关推荐
CoovallyAIHub33 分钟前
Moonshine:比 Whisper 快 100 倍的端侧语音识别神器,Star 6.6K!
深度学习·算法·计算机视觉
CoovallyAIHub2 小时前
速度暴涨10倍、成本暴降6倍!Mercury 2用扩散取代自回归,重新定义LLM推理速度
深度学习·算法·计算机视觉
CoovallyAIHub2 小时前
实时视觉AI智能体框架来了!Vision Agents 狂揽7K Star,延迟低至30ms,YOLO+Gemini实时联动!
算法·架构·github
CoovallyAIHub2 小时前
开源:YOLO最强对手?D-FINE目标检测与实例分割框架深度解析
人工智能·算法·github
CoovallyAIHub2 小时前
OpenClaw:从“19万星标”到“行业封杀”,这只“赛博龙虾”究竟触动了谁的神经?
算法·架构·github
刀法如飞3 小时前
程序员必须知道的核心算法思想
算法·编程开发·算法思想
徐小夕4 小时前
pxcharts Ultra V2.3更新:多维表一键导出 PDF,渲染兼容性拉满!
vue.js·算法·github
CoovallyAIHub5 小时前
OpenClaw一脚踩碎传统CV?机器终于不再只是看世界
深度学习·算法·计算机视觉
CoovallyAIHub5 小时前
仅凭单目相机实现3D锥桶定位?UNet-RKNet破解自动驾驶锥桶检测难题
深度学习·算法·计算机视觉
zone77395 小时前
002:RAG 入门-LangChain 读取文本
后端·算法·面试