Sammie Bae编写的《数据结构与算法(JavaScript版)》一书,通过详尽的示例和代码解析了数据结构及算法的基础知识及其在JavaScript中的应用。
**Introduction**
The motivation for writing this book stemmed from the scarcity of resources available on data structures and algorithms specifically written in JavaScript. This was surprising to me, given that many software development job opportunities today require proficiency in JavaScript; it is the only language capable of being used across the entire stack, including front-end, mobile (both native and hybrid), and back-end platforms. Understanding how data structures operate and knowing how to design algorithms for building applications are crucial skills for JavaScript developers.
This book aims to teach fundamental concepts of data structures and algorithms from a computer science perspective but tailored specifically for JavaScript rather than the more common languages like Java or C++. Because JavaScript employs prototypal inheritance, unlike Java and C++ which use classical inheritance patterns, there are distinct differences in how data structures are implemented in JavaScript. The classical inheritance model involves creating a blueprint that objects follow during inheritance, whereas with prototypal inheritance, objects are copied and their properties modified.
The book begins by covering essential mathematics for Big-O analysis before delving into basic JavaScript foundations such as primitive types and objects. It then proceeds to detail the implementation of fundamental data structures like linked lists, stacks, trees, heaps, and graphs through algorithms. Finally, it explores more advanced topics including efficient string search algorithms, caching strategies, dynamic programming problems in considerable depth.
**Chapter Outline**
1. Big-O Notation
2. [Removed: Unique Parts]
3. JavaScript Numbers
4. JavaScript Strings
5. JavaScript Arrays
6. JavaScript Objects
7. JavaScript Memory Management
8. Recursion
9. Sets
10. Searching and Sorting Algorithms
11. Hash Tables
12. Stacks and Queues
13. Linked Lists
14. Caching Techniques
15. Trees
16. Heaps
17. Graphs
18. Advanced String Operations
19. Dynamic Programming Problems
20. Bit Manipulation