标题: 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 data % { R0 M1 s' A9 U6 W4 Y6 cstructures and algorithms written in JavaScript. This was strange to me because 5 x1 X7 {9 b b2 ltoday many of the job opportunities for software development require knowledge of# R7 M0 C, F& H) }; |/ |3 |( y
JavaScript; it is the only language that can be used to write the entire stack, including the9 q5 t0 d9 _+ ?9 Z9 |, G
front-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript5 v3 ~5 P W; n' d
developers to understand how data structures work and how to design algorithms to4 _) \8 l) [: I; b
build applications. 4 v0 s6 X( b8 i5 ITherefore, this book aims to teach data structure and algorithm concepts from0 r# `3 v4 @9 o8 P
computer science for JavaScript rather than for the more typical Java or C++. Because S' M; C% v6 X3 Q# Q( l5 _$ U* g) T: lJavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow! }* h0 V2 k/ B6 x' c6 B9 f6 A4 T
the inheritance pattern), there are some changes in writing data structures in JavaScript." D/ h1 C7 u# |; r! A+ [% l: K
The classical inheritance pattern allows inheritance by creating a blueprint-like1 g' q) I% h" o2 T
form7 T8 M8 h h# \) `: i* _( k
that objects follow during inheritance. However, the prototypal inheritance pattern1 _, v! G$ z9 |
means copying the objects and changing their properties. / T3 [2 W3 N* `( x8 q5 EThis book first covers fundamental mathematics for Big-O analysis and then lays out( \7 _6 J$ C( A0 g+ J
the basic JavaScript foundations, such as primitive objects and types. Then, this book) y( j3 U# _4 T( z- _
covers implementations and algorithms for fundamental data structures such as linked" B% O* @) S+ j# D* T. E
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient / Q# [. `4 {! `5 |% W9 n' Z0 mstring search algorithms, caching algorithms, and dynamic programming problems are( g1 W( K) V' m; H5 J- f: {6 N
explored in great detail.. |+ T- g* g( C. o M/ x7 r
9 d. U1 N2 X8 a; i1 `4 u( L, M 5 O: X- ~+ b9 C4 _$ r