Learning JavaScript Data Structures and Algorithms (3rd Edition)
Loïanne GrognetPosts & Telecom Press2019
Rating 4.3- Chapters
- 15
- Series
- Turing Programming Series · Web Development
- ISBN
- 9787115510174
Tags
Computing Programming Front-End DevelopmentDev EnvironmentDevelopersControl StructuresData StructureProgramming DesignComputer ScienceDebugging ToolsObject-OrientedDesign SeriesSummary
This book is the Chinese translation of Learning JavaScript Data Structures and Algorithms, Third Edition, by the Brazilian developer Loiane Groner, published by Posts & Telecom Press in 2019 as part of the Turing Programming Series · Web Development. The book has 15 chapters. It begins with the JavaScript language and development environment, briefly reviewing variables, operators, control structures, functions, object orientation and debugging tools, and devotes a separate chapter to the new features of ECMAScript 2015 and later and the basics of TypeScript, preparing the ground for later implementations. The main body is built around "implementing it yourself": arrays, stacks, queues and deques, and linked lists (singly linked, doubly linked, circular and ordered) form the basic containers; sets, dictionaries and hash tables explain the principles of lookup structures; recursion, binary trees and binary search trees, self-balancing trees (including red-black trees), binary heaps and heap sort lead into nonlinear structures; and graphs introduce adjacency representation, DFS and BFS, shortest paths and minimum spanning trees and other classic algorithms. The algorithms chapters cover bubble, selection, insertion, merge, quick, counting, bucket and radix sorts, sequential search, binary search and interpolation search, and the Fisher-Yates shuffle; the advanced section discusses divide and conquer, dynamic programming, greedy and backtracking (the rat in a maze, a Sudoku solver), and briefly introduces map, filter and reduce in functional programming; the final chapter explains big-O notation and comparison of time complexity and outlines NP-completeness theory. All examples are written in modern JavaScript, and the accompanying source code can run in the browser or in Node.js, making the book a practical textbook for moving from syntax to algorithmic thinking.Editor's review
很多前端工程师的算法知识是“背”来的:面试前刷几道题,可一旦遇到需要自己设计缓存、调度队列或处理树形数据的真实场景,就会发现清单和套路都不牢靠。这本书的价值正在于反其道而行——它不急于把题目丢给读者,而是从“如何用JavaScript手写一个栈、一个队列、一棵红黑树”开始,让读者亲手把每种结构的增删改查写出来,再回头看算法为什么这样设计。 第三版相较前两版做了较大更新:新增了ECMAScript与TypeScript概述、递归、二叉堆和堆排序、算法设计与技巧四章,补充了双端队列、自平衡树、计数排序与基数排序等内容,并加入了Fisher-Yates随机算法、迷宫老鼠和数独解题器等有趣的练习。代码基于ES2015+,同时提供TypeScript版本,配套源码可直接在浏览器或Node.js中跑起来,边读边验证,学习闭环很完整。 语言通俗、节奏平缓、图示清楚,是这本教材最讨喜的地方。它不假设你学过C++或Java的算法课,也不要求数学功底,只要会写JavaScript的基本语法就能跟上。对于想把“会用API”升级为“懂原理”的开发者,这是一条相对省力的路径;但若追求竞赛级的算法深度,仍需再补充更系统的理论读物。Who it's for
A good fit for
- 有JavaScript基础、想系统补齐数据结构与算法短板的前端开发者
- 计算机相关专业学生,希望用熟悉语言完成算法课程配套练习
- 准备技术面试、需要手写常见数据结构与排序搜索算法的求职者
- 想了解TypeScript写法与ES2015+新特性在工程中如何落地的工程师
Not a good fit for
- 完全没有编程经验、尚未掌握变量、函数与基本语法的零基础读者
- 希望专攻C++或Java竞赛算法、追求极致性能与数学推导的读者
- 只想刷题库速成、不愿动手敲代码实现数据结构的备考者
Reading tips
- 第1、2章可快速浏览,重点确认环境搭建与ES2015+语法,再进入第3章。
- 每章按“先读原理、再抄写实现、最后改造成自己的小库”的顺序推进,切忌只看不写。
- 把第4章起构建的数据结构与算法库持续迭代,读完时它可作为个人项目与面试作品。
- 第13至15章建议配合LeetCode简单题练手,用大O分析复盘每一步的时间与空间开销。
About the publisher
Posts & Telecom Press China · Founded in 1953Posts & 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
- Chapter 1 Introduction to JavaScript
- Chapter 2 Overview of ECMAScript and TypeScript
- Chapter 3 Arrays
- Chapter 4 Stacks
- Chapter 5 Queues and Deques
- Chapter 6 Linked Lists
- Chapter 7 Sets
- Chapter 8 Dictionaries and Hash Tables
- Chapter 9 Recursion
- Chapter 10 Trees
- Chapter 11 Binary Heaps and Heap Sort
- Chapter 12 Graphs
- Chapter 13 Sorting and Searching Algorithms
- Chapter 14 Algorithm Design and Techniques
- Chapter 15 Algorithm Complexity
FAQ
这本书适合零基础学编程的人吗?
不太适合。书中第1章仅用约20页回顾JavaScript语法,随后很快进入数据结构实现。读者最好已能独立写出函数、对象和数组操作,否则建议先补完JavaScript入门内容再读。第3版和第2版差别大吗?买哪版更好?
差别较大。第3版新增ECMAScript与TypeScript概述、递归、二叉堆和堆排序、算法设计与技巧四章,并补充双端队列、自平衡树、计数与基数排序等内容,代码更新到ES2015+,还有TypeScript版本源码,建议选第3版。书中的代码可以直接运行吗?
可以。作者在GitHub上公开了配套源码,JavaScript与TypeScript版本齐全,可在浏览器中打开示例页面,也可用Node.js逐个运行章节文件。部分示例需先执行依赖安装。读完能应付前端面试的算法题吗?
能打下扎实基础,覆盖数组、链表、栈队列、树、图、排序搜索、动态规划等常见考点,并强调手写实现与大O分析。但本书不是题库,想提升笔试通过率还需配合刷题练习。书里有讲红黑树和最短路径这些进阶内容吗?
有。第10章在二叉搜索树之后介绍自平衡树,包括红黑树的基本操作;第12章讲解图的表示、DFS与BFS,并涉及最短路径算法与最小生成树,篇幅精简但思路完整。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
Loïanne Grognet AuthorLoïanne Grognet is an author of computer books about whom limited public information is available. Her works are mainly aimed at readers who want to learn JavaScript data structures and algorithms systematically. Four of her works are included in the collection, with the second and third editions of Learning JavaScript Data Structures and Algorithms as representative titles. These books use JavaScript to explain common data structures and algorithmic ideas, and are commonly classified under computing, programming design, and software learning. Judging from how the works are positioned, Grognet's writing emphasizes combining basic concepts with hands-on code practice, serving both introductory and more advanced learning scenarios, and is suitable for developers who want to build a solid foundation in algorithms.