标题: JavaScript Data Structures and Algorithms超经典的算法书! [打印本页] 作者: madio 时间: 2020-2-25 12:21 标题: JavaScript Data Structures and Algorithms超经典的算法书! The motivation for writing this book was the lack of resources available about data8 X& _2 B; L2 [$ `4 h: b# I
structures and algorithms written in JavaScript. This was strange to me because* g' }1 M( J4 y8 h' a6 {
today many of the job opportunities for software development require knowledge of4 b T0 m' {2 \3 ~/ g; Y
JavaScript; it is the only language that can be used to write the entire stack, including the , q& D- O& e3 J1 ]( Afront-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript . ^6 V- v" H5 z" t; Zdevelopers to understand how data structures work and how to design algorithms to : g1 R$ o7 j' _! ]- Q' [3 g1 ?9 _build applications. l/ w6 Z4 v0 i+ M$ V/ d$ J
Therefore, this book aims to teach data structure and algorithm concepts from + o6 B6 j7 H' R; e) m; ?% l" ?computer science for JavaScript rather than for the more typical Java or C++. Because 6 L# y7 S& C" u- ?. U* GJavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow / _6 C' _. N( x5 i* H/ bthe inheritance pattern), there are some changes in writing data structures in JavaScript. % M4 E6 Y. c: \7 lThe classical inheritance pattern allows inheritance by creating a blueprint-like& W6 r3 Q- f9 b* }( D# X
form1 p- T" K& n4 c7 V& p
that objects follow during inheritance. However, the prototypal inheritance pattern q# ?0 S' {7 P* v' }6 f2 [* p9 y: Imeans copying the objects and changing their properties." w8 T& p) c$ K
This book first covers fundamental mathematics for Big-O analysis and then lays out 3 ^7 ~ K z3 U Z0 ~the basic JavaScript foundations, such as primitive objects and types. Then, this book * ]# K1 B: n9 `5 z6 y3 ~covers implementations and algorithms for fundamental data structures such as linked! O& ^' r4 o) ?4 |. h% Y4 F" X7 i
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient : }5 z) K# ]* s5 |, E" h; fstring search algorithms, caching algorithms, and dynamic programming problems are+ @7 G8 e2 ]% \! ?
explored in great detail. $ N. J. C$ e- f6 m* g2 D: A0 {& D- |% [! z9 ~0 g0 R
/ B+ k0 T: i! `) m) W: ~* n% p$ z$ a, S