Python Data Structures and Algorithms Analysis (3rd Edition) cover

Python Data Structures and Algorithms Analysis (3rd Edition)

Rating 4.7
Word count
440 words
Chapters
1
Series
Turing Programming Series · Python
ISBN
9787115623348

Tags

Summary

The original English edition of this book is Problem Solving with Algorithms and Data Structures Using Python, one of the classic textbooks that teach data structures and algorithms using Python. The book has eight chapters. Chapter 1 begins with computer science, problem solving, and object-oriented programming, preparing readers with the Python 3 syntax and class-design foundations they will need. Chapter 2 introduces algorithm analysis, focusing on Big O notation and examining the performance of various operations on Python lists and dictionaries. Chapter 3 uses the idea of abstract data types to explain stacks, queues, deques, and linked lists, with classic case studies such as parenthesis matching, number-base conversion, expression evaluation, queue simulation, and palindrome checking. Chapter 4 covers recursion, including the three laws of recursion, stack frames, recursion visualization, maze solving, and dynamic programming. Chapter 5 covers sequential search, binary search, and hashing, as well as bubble, selection, insertion, Shell, merge, and quick sorts, comparing their performance. Chapter 6 covers trees, including tree representations, parse trees, tree traversals, binary heaps and priority queues, binary search trees, and AVL balanced trees. Chapter 7 covers graphs, including two representations of graphs, breadth-first search and depth-first search, topological sorting, strongly connected components, and Dijkstra's and Prim's algorithms. Chapter 8 presents advanced topics, including RSA, skip lists, image quantization with octrees, DFAs, and KMP. The third edition rewrites the example code to follow PEP 8, updates outdated material, and adopts the new pythonds3 package; each chapter includes a summary, key terms, and exercises.

Editor's review

如果把 Python 比作一件称手的兵器,数据结构和算法就是使用这件兵器的方法。本书是较早系统地用 Python 讲数据结构与算法的教材之一,被华盛顿大学、北京大学等多所高校选用,在中文读者中的评价长期保持在 9 分以上。它讲清的是“该用哪种结构、代价有多大”这类判断,贯穿始终的大 O 分析会配合列表、字典、栈、队列、树和图的实现,一处处讲明每一步操作的时间代价,读者能比较清楚地看出为什么用哈希表查找更快、为什么平衡树能避免退化成链表。书里的例子也值得花时间动手写:括号匹配、进制转换、表达式求值、传土豆、打印任务模拟、迷宫求解、词梯、骑士周游,每个都能独立运行,把抽象概念变成可以观察的结果。第 3 版按 PEP 8 规范重写了全部代码,修正了第 2 版中的过时写法,并改用 pythonds3 包,配有每章小结、关键术语与练习,适合课堂教学,也适合自学。需要说明的是,本书侧重实现与复杂度分析,没有展开高级数据结构或算法竞赛式的技巧,想深入图算法与算法竞赛可再拓展其他资料。

Who it's for

A good fit for

  • 已经会写 Python 基础代码、想系统补齐数据结构与算法的自学者
  • 计算机、软件工程等专业本科生,配合数据结构课程当作教材或参考书
  • 需要复习大 O 记法、递归、排序、树与图,以应对笔试和面试的人
  • 希望把算法知识真正写出来,而不只是停留在概念上的在职程序员

Not a good fit for

  • 完全没写过 Python、对函数和类都不熟悉的零基础读者
  • 只想刷题速成、追求竞赛级算法技巧的读者
  • 希望系统学习数据结构 C 语言实现的读者,本书不涉及其他语言的版本

Reading tips

  1. 先读第 1、2 章,并在本机配好 Python 3 与 pythonds3 包,把解释器配好,再进入后面的章节
  2. 每章的示例代码都亲手敲一遍并改参数观察运行时间,让大 O 分析从公式变成可以量化的判断
  3. 第 4、5 章(递归与排序、搜索)建议做完全部练习,这部分是后续树与图的直接基础
  4. 可把第 6、7 章的树与图作为专题精读,配套用 LeetCode 上对应的简单题巩固实现细节

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Turing Series in Computer Programming · Python Series

FAQ

这本书第 3 版和第 2 版有什么不同?
第 3 版新增了第三作者罗曼·亚西诺夫斯基,按 PEP 8 规范重写了全部示例代码,修正了过时内容,并改用新的 pythonds3 包。两版章节结构接近,但代码风格与可运行性明显改善,新人入手建议直接选第 3 版。
看这本书需要什么基础?
需要掌握 Python 基本语法、函数定义和类的基本用法。第 1 章会复习这些内容,但篇幅有限;若对列表、字典、循环和面向对象完全陌生,建议先用其他入门书打底。
书中的例子能直接运行吗?
可以。第 3 版的示例基于 Python 3,并按 PEP 8 规范重写。部分章节依赖作者维护的 pythonds3 包,可按书前说明安装;个别案例还标注了配套在线资源。
这本书和《算法导论》是什么关系?
两者定位差别很大。《算法导论》偏重理论证明与伪代码,这本书以 Python 实现为主线,强调动手写代码和复杂度分析,更适合作为本科入门与工程实践之间的过渡。
读完能应对算法面试吗?
能打好基础。本书覆盖面试常考的大 O 分析、排序、二分、散列、二叉树、图遍历与最短路径,但题目量少于刷题书,建议配合题库一起练习。

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.

Top rated in the same category