The motivation for writing this book was the lack of resources available about data 7 B/ `7 N3 n$ Ustructures and algorithms written in JavaScript. This was strange to me because 0 J5 T; {" Y. r- K& ktoday many of the job opportunities for software development require knowledge of # L1 H, K" P! b2 K, h' MJavaScript; it is the only language that can be used to write the entire stack, including the # j2 a* o' b" o9 K& j9 Sfront-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript9 I5 n: `- [0 [ K' X A. Q
developers to understand how data structures work and how to design algorithms to4 r5 b `! Y) z) p9 w6 T
build applications. : _* ?" P' z! f3 z& y3 kTherefore, this book aims to teach data structure and algorithm concepts from0 w1 D' t2 X% B3 B" ]
computer science for JavaScript rather than for the more typical Java or C++. Because% z; D w9 N0 K0 q
JavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow 8 F) u3 O A2 N2 A6 Jthe inheritance pattern), there are some changes in writing data structures in JavaScript. 9 ]1 D& ]9 E! f( DThe classical inheritance pattern allows inheritance by creating a blueprint-like / b( I! e- D- y$ D" t$ U zform & y9 _5 S; k8 ~+ f' U$ E; ]that objects follow during inheritance. However, the prototypal inheritance pattern3 P& v8 B6 U; ] B8 R4 @" G
means copying the objects and changing their properties. R6 L% C6 v3 N, H# L0 U' @This book first covers fundamental mathematics for Big-O analysis and then lays out4 b' h7 J# j4 C$ F3 v% J
the basic JavaScript foundations, such as primitive objects and types. Then, this book + l! Q& T7 e. \covers implementations and algorithms for fundamental data structures such as linked 0 N0 W, F' P5 V% V& xlists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient 4 I% u6 C, @( z- F2 \' Q% Z: tstring search algorithms, caching algorithms, and dynamic programming problems are2 e( k& x, K& p/ z
explored in great detail. % ]% l. } l; P) q6 L3 Z1 O0 y# B+ D