Python Common Algorithms Handbook (2nd Edition) cover

Python Common Algorithms Handbook (2nd Edition)

Rating 3.3
Word count
89K words
Chapters
107
ISBN
9787113310776

Tags

Summary

As information technology advances and its applications expand, computer science and programming skills have become essential technical aids across industries. This trend makes the need to learn and master programming algorithms increasingly urgent. Yet the complexity and abstraction of algorithm study often leave beginners struggling. A book that uses Python, a mainstream programming language, to demonstrate algorithmic thinking through practical problems is therefore especially valuable. This book offers readers a systematic, in-depth, and accessible path to learning common algorithms, helping them better understand and apply algorithmic thinking.

Editor's review

This book is for Python beginners and intermediate learners. Using Python, it combines the ideas behind common algorithms with hands-on problem solving. Compared with purely theoretical algorithm textbooks, it emphasizes turning abstract algorithms into working Python code, helping readers understand algorithmic logic through practice and lowering the barrier to entry. Organized around common algorithms, it works as a systematic introduction to algorithms and as a desk reference. Readers are advised to code along on a computer, running examples before revisiting ideas they find difficult. For those consolidating programming fundamentals, preparing for technical interviews, or filling gaps in algorithm knowledge, this book offers practical guidance. Note that learning algorithms requires practice: the book's value lies in providing a path and examples, and readers must still invest time in exercises and review.

Who it's for

A good fit for

  • Programming beginners who have just finished Python basics and want a systematic introduction to common algorithms
  • Students who need to consolidate algorithm fundamentals for technical interviews or coursework
  • Developers who use Python to solve real problems at work and want to strengthen their algorithmic thinking
  • Self-learners who use algorithm books as references and need to look up common algorithm examples at any time

Not a good fit for

  • Absolute beginners with no programming background and no exposure to Python syntax
  • Experienced readers who have mastered competitive programming or advanced algorithms and seek deep theoretical derivations
  • Readers who want theory only and are unwilling to write code or do exercises

Reading tips

  1. Read the table of contents first, study topic by topic, and implement each algorithm in Python as you learn it
  2. Think through a solution before reading the code, then compare it with the book's example and note any differences in approach
  3. After each chapter, do a few variation exercises to apply the algorithm to new problems and test your understanding
  4. Use the book as a reference: look up algorithms by category when specific problems arise instead of reading cover to cover

About the publisher

China Railway Publishing House China · Founded in 1951

China Railway Publishing House has long centered on railway professional publishing while also covering rail transit, industrial technology, programming and design, finance and economics, and exam preparation, with about 194 relevant titles in the collection. Representative books include the Automated Operation (FAO) System for Urban Rail Transit, Design Innovation and Practice for Urban Rail Transit Vehicle Depots, Analysis and Application Management of the Level-One Maintenance Inspection Robot System for Electric Multiple Units, as well as engineering practice titles such as the Engineering Summary of the Guangdong Section of the Ganzhou–Shenzhen Railway and Safety Risk Control Technology and Typical Cases of Shield Tunneling in Beijing Urban Rail Transit Construction. Beyond technical monographs, the publisher also offers practical titles such as Python Programming Fundamentals and tax and accounting treatment for real estate development enterprises, with authors including He Peng, Tang Tao, Ding Shukui, and Sun Changjun. Based on public information, its publishing strength lies in drawing on line engineering and operational practice while balancing professional textbooks and general-audience titles; more complete details of its publishing structure are limited in public sources.

Contents

  1. 版权信息
  2. 前言
  3. 第1章 初步认识算法思想
  4. 1.1 什么是算法
  5. 1.2 算法是程序的灵魂
  6. 1.3 算法的表示方法
  7. 1.4 Python算法思想
  8. 第2章 枚举算法思想
  9. 2.1 Python中的枚举算法
  10. 2.2 算法演练:找出符合条件的五位数
  11. 2.3 算法演练:24点游戏
  12. 2.4 算法演练:解决熄灯问题
  13. 2.5 算法演练:解决旅行销售员问题
  14. 第3章 递归算法思想
  15. 3.1 递归算法思想基础
  16. 3.2 算法演练:解决“斐波那契数列”问题
  17. 3.3 算法演练:阶乘问题
  18. 3.4 算法演练:进制转换器
  19. 3.5 算法演练:解决二叉树遍历问题
  20. 3.6 算法演练:图像分割问题
  21. 第4章 分治算法思想
  22. 4.1 分治算法思想基础
  23. 4.2 算法演练:二分法找出有序列表指定值
  24. 4.3 算法演练:求顺序表中数据最大值
  25. 4.4 算法演练:找出一组序列中第k小(大)的元素
  26. 4.5 算法演练:实现归并排序
  27. 4.6 算法演练:整数划分
  28. 第5章 贪心算法思想
  29. 5.1 贪心算法思想基础
  30. 5.2 算法演练:解决“汽车加油”问题
  31. 5.3 算法演练:求最大子元素之和
  32. 5.4 算法演练:解决“幼儿园分糖果”问题
  33. 5.5 算法演练:移除k个数字
  34. 5.6 算法演练:解决“霍夫曼编码”问题
  35. 5.7 算法演练:用Kruskal算法求最小生成树
  36. 5.8 算法演练:安排会议室
  37. 第6章 回溯算法思想
  38. 6.1 回溯算法思想基础
  39. 6.2 算法演练:破解“解空间”
  40. 6.3 算法演练:解决“全排列”问题
  41. 6.4 算法演练:解决“最长公共子序列”问题
  42. 6.5 算法演练:解决“排课”问题
  43. 6.6 算法演练:解决“最佳作业调度”问题
  44. 6.7 算法演练:解决“图的遍历”问题
  45. 6.8 算法演练:解决“爬楼梯”问题
  46. 6.9 算法演练:解决“m着色”问题
  47. 6.10 算法演练:解决“旅行销售员”问题
  48. 6.11 算法演练:解决“八皇后”问题
  49. 6.12 算法演练:解决“迷宫”问题
  50. 6.13 算法演练:为外卖小哥规划最佳送餐路径
  51. 第7章 迭代算法思想
  52. 7.1 迭代算法思想基础
  53. 7.2 算法演练:解决“斐波那契数列”问题
  54. 7.3 算法演练:解决“角谷猜想”问题
  55. 7.4 算法演练:使用牛顿迭代法计算方程的根
  56. 7.5 算法演练:使用牛顿迭代法求平方根
  57. 7.6 算法演练:使用牛顿迭代法求极值并绘制曲线
  58. 7.7 算法演练:求方程在x附近的一个实根
  59. 7.8 算法演练:解决“非线性方程组”问题
  60. 7.9 算法演练:使用Jacobi迭代法求解线性方程组
  61. 7.10 算法演练:使用Gauss-Seidel迭代法求解线性方程组
  62. 7.11 算法演练:为房东解决房屋租金调整的问题
  63. 第8章 查找算法
  64. 8.1 查找算法基础
  65. 8.2 线性表查找:顺序查找算法
  66. 8.3 线性表查找:折半查找算法
  67. 8.4 线性表查找:插值查找算法
  68. 8.5 线性表查找:分块查找算法
  69. 8.6 基于树的查找法:二叉排序树算法
  70. 8.7 基于树的查找法:平衡二叉排序树算法
  71. 8.8 哈希查找算法
  72. 8.9 斐波那契查找算法
  73. 8.10 红黑树查找算法
  74. 8.11 算法演练:解决图书馆书籍查找和借阅问题
  75. 第9章 排序算法
  76. 9.1 排序算法基础
  77. 9.2 插入排序算法
  78. 9.3 希尔排序
  79. 9.4 交换类排序:冒泡排序算法
  80. 9.5 交换类排序:快速排序算法
  81. 9.6 选择排序算法
  82. 9.7 堆排序算法
  83. 9.8 归并排序算法
  84. 9.9 基数排序算法
  85. 9.10 综合比较各种排序算法
  86. 第10章 使用算法解决数据结构问题
  87. 10.1 约瑟夫环
  88. 10.2 操作顺序表
  89. 10.3 操作链表
  90. 10.4 综合实战:商业日程管理系统
  91. 第11章 使用算法解决常见数学问题
  92. 11.1 一段神奇的字符
  93. 11.2 完全数
  94. 11.3 亲密数
  95. 11.4 素数
  96. 第12章 经典算法问题
  97. 12.1 借书方案
  98. 12.2 平分七筐鱼问题
  99. 12.3 五家共井问题
  100. 12.4 常胜将军问题
  101. 12.5 三色彩带问题
  102. 第13章 人工智能算法
  103. 13.1 线性回归算法
  104. 13.2 二元决策树算法
  105. 13.3 Bagging算法
  106. 13.4 Boosting算法
  107. 13.5 随机森林算法

FAQ

I have no algorithm background and only know a little Python. Can I understand this book?
You can try, but you will need to fill in the basics as you read. The book implements common algorithms in Python and assumes basic syntax skills. Make sure you can independently write loops, functions, and simple data structure operations before working through the chapters in order. When code is unclear, run it first and observe the output, then return to the logic.
Is this book suitable for preparing for programming interviews?
It can serve as supplementary material for interview preparation. It covers Python implementations of common algorithms and problem exercises, which help build basic problem-solving approaches. Interviews also involve problem variations and complexity analysis, so combine it with practice problems and apply the book's algorithms to new questions rather than memorizing sample code.
What runtime environment do the algorithm examples require?
The examples run with Python; the specific version and dependencies are not specified in the materials. We recommend installing a recent Python 3 environment and running the code in chapter order. If you encounter errors, check syntax and indentation first, then compare your code line by line with the book's.
Should I read it cover to cover or use it for reference?
Both approaches work. Beginners should study the chapters in order to build a complete framework; readers with some background or urgent work problems can look up algorithms by category. Either way, implement the code and do a few exercises rather than only reading.

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

徐庆丰 Author

Xu Qingfeng is an author about whom limited public information is available. At present, he is known only as the author of Python Common Algorithms Handbook (2nd Edition), a work categorized under programming design. Judging from the title and category, the book focuses on commonly used algorithms in the Python programming language and is intended for readers who wish to study algorithm implementation and application systematically, making it a technical reference work. Xu Qingfeng's writing is practice-oriented, combining algorithmic principles with Python code so that readers can understand and apply common algorithms within a programming environment. Although details such as his personal background, nationality, and dates of birth and death remain unclear, the work offers hands-on learning material in the field of programming design and can serve as an auxiliary text for both introducing and consulting algorithms. Based on the available information, Xu Qingfeng's public profile is sparse, and his output is represented mainly by this single work.

Top rated in the same category