Programming abstractions in C阅读笔记:p161-p165

news/2025/6/19 18:29:23

《Programming Abstractions In C》学习第57天,开始第4章“Introduction to Recursion”的学习,p161-p165,总结如下。

一、技术总结

1.recursion vs stepwise refinement

答:p164, The strategy, called recursion is defined as any solution technique in which large problems are solved by reducing them to smaller problem of the same form. The italicized phrase(注:斜体短语指the same form, 书上是用斜体表示的) is crucial to the definition, which otherwise describes the basic strategy of stepwise refinement。

把一个大问题分解为相同形式的小问题,这种策略称为“recursion(递归)”;把一个大问题分解为不同的小问题,这种策略称为“stepwise refinement(逐步求精)。

因为递归是把一个难的问题拆分为简单的问题进行处理,所以递归这种解决问题的方案也称为分而治之(divide-and-conquer)策略。

二、英语总结

1.with relatively little trouble语法分析

答:p164,Because these operations are fimilar, most people learn to use the control statements for, while and if with relatively little trouble。“with relatively little trouble”这里使用little修饰trouble,表示“麻烦较少”,而不是“小麻烦”,所以翻译的时候要转换一下:因为这些操作都是类似的,所以大多数人学习使用for, while和if控制语句相对容易一些。

2.refinement什么意思?

答:
(1)refinement < refine: refinement是refine的名称形式, u. the process of making a substance pure。
(2)refine: re- + fine: fine repeatedly(重复地fine), to make sth pure(提炼)。
(3)fine: vt. pury, clearify, to make finer in quality or size(使澄清,简化)。

3.almost是什么意思?

答:adv. nearly but not quite,接近但是不完全,中文翻译成“几乎,近乎”,但是几乎后面跟形容词并不是很恰当。例如p164,“As a problem-solving tool, recursion is so powerful that it at times seems almost magical.”,从英文的角度而言,almost magical 就是“nearly magical”,接近于magical,但是并不是magical。如果从中文角度,翻译成“近乎神奇”,这里的“神奇”就是名词的用法了,而不是形容词。

三、参考资料

1. 编程

(1)Eric S.Roberts,《Programming Abstractions in C》:https://book.douban.com/subject/2003414

2. 英语

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

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

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


https://dhexx.cn/news/show-5071381.html

相关文章

Vue知识系列(7)每天10个小知识点

目录 系列文章目录Vue知识系列&#xff08;1&#xff09;每天10个小知识点Vue知识系列&#xff08;2&#xff09;每天10个小知识点Vue知识系列&#xff08;3&#xff09;每天10个小知识点Vue知识系列&#xff08;4&#xff09;每天10个小知识点Vue知识系列&#xff08;5&#x…

redis 主存复制

1. 前言 Redis的持久化机制&#xff0c;它很好的解决了单台Redis服务器由于意外情况导致Redis服务器进程退出或者Redis服务器宕机而造成的数据丢失问题。 在一定程度上保证了数据的安全性&#xff0c;即便是服务器宕机的情况下&#xff0c;也可以保证数据的丢失非常少。 通常…

苹果CMS主题 MXonePro二开优化修复开源版影视网站源码

MXPro模板主题(又名&#xff1a;mxonepro)是一款基于苹果cms程序的一款全新的简洁好看UI的影视站模板类似于西瓜视频&#xff0c;不过同对比MxoneV10魔改模板来说功能没有那么多,也没有那么大气&#xff0c;但是比较且可视化功能较多简洁且有周更记录样式等多功能后台设置&…

如何安装maatwebsite/excel?

背景 项目要下载内容&#xff0c;那最好是用扩展了&#xff0c;常用的也就是maatwebsite/excel,但是今天安装的提示异常 错误如下&#xff1a; Problem 1- maatwebsite/excel[3.1.28, ..., 3.1.30] require phpoffice/phpspreadsheet 1.16.* -> satisfiable by phpoffice/…

口袋参谋:如何实时掌握竞品数据?有什么方法?

​俗话说的好&#xff1a;知己知彼&#xff0c;方能百战百胜&#xff01;生意场如战场&#xff0c;我们的产品想要在激烈的市场竞争中脱颖而出&#xff0c;就要时刻关注竞争对手在做什么&#xff0c;怎么做的&#xff1f; 特别是新手卖家&#xff0c;还没有形成自己的运营策略&…

思科路由器:NAT的基础配置

一直以来&#xff0c;对于华为、H3C、锐捷交换机的命令配置&#xff0c;不断的有朋友留言&#xff0c;三家交换机的配置命令容易弄混&#xff0c;经常在实际项目配置中出错&#xff0c;因此&#xff0c;找几个基础的示例来练练。 R1配置 Router>en Router>enable Rout…

GLTF-pipeline

gltf-pipeline可用作命令行工具或 Node.js 模块。 开始 安装 Node.js如果还没有&#xff0c;然后&#xff1a; npm install -g gltf-pipeline使用 gltf-pipeline 作为命令行工具&#xff1a; 将 glTF 转换为 glb gltf-pipeline -i model.gltf -o model.glb gltf-pipeline…

C#,数值计算——Hashfn2的计算方法与源程序

1 文本格式 using System; using System.Collections; using System.Collections.Generic; namespace Legalsoft.Truffer { public class Hashfn2 { private static ulong[] hashfn_tab { get; set; } new ulong[256]; private ulong h { get; set;…

从collections库的Counter类看items()方法和enumerate()方法

下面的代码是针对文件的词频统计&#xff0c;使用了collections库及其Counter类 import collections def count_word_frequency(text): words text.lower().split() word_counts collections.Counter(words) return word_counts def count_fileword_frequency(fi…

【Unity基础】4.动画Animation

【Unity基础】4.动画Animation 大家好&#xff0c;我是Lampard~~ 欢迎来到Unity基础系列博客&#xff0c;所学知识来自B站阿发老师~感谢 &#xff08;一&#xff09;Unity动画编辑器 &#xff08;1&#xff09;Animation组件 这一张我们要学习如何在unity编辑器中&…