The motivation for writing this book was the lack of resources available about data # e! }+ m. P d- h, S! ~structures and algorithms written in JavaScript. This was strange to me because% u: f/ J; S) x
today many of the job opportunities for software development require knowledge of$ k5 E6 C6 x5 x& r) O
JavaScript; it is the only language that can be used to write the entire stack, including the. K" y/ `+ z5 U) v$ u
front-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript , m9 ?% T x; \+ A" w( \: N3 Hdevelopers to understand how data structures work and how to design algorithms to ; ^; v" i6 [% C, |build applications.- t! S4 ~# u. i9 Y, ]0 C3 b
Therefore, this book aims to teach data structure and algorithm concepts from! n; W7 Z5 X+ t9 g+ C4 h
computer science for JavaScript rather than for the more typical Java or C++. Because- m- ]( Q6 h5 Q0 `; }
JavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow $ i, A1 B& }, x7 Gthe inheritance pattern), there are some changes in writing data structures in JavaScript. . u+ Z6 w3 T8 DThe classical inheritance pattern allows inheritance by creating a blueprint-like ! M# ?5 u5 y+ O2 W# ]; K% E0 Tform , u: ]- F6 C2 w8 Rthat objects follow during inheritance. However, the prototypal inheritance pattern, N6 Q* W. C+ o& X% j8 F: ?
means copying the objects and changing their properties.8 o+ O; C) V/ B
This book first covers fundamental mathematics for Big-O analysis and then lays out8 I+ T( f8 r' I, K
the basic JavaScript foundations, such as primitive objects and types. Then, this book 8 _- q" z0 e/ b8 g) g( pcovers implementations and algorithms for fundamental data structures such as linked , D: {6 ?, b) |: W( O2 Xlists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient% {$ ` U Q: j1 p2 i, X
string search algorithms, caching algorithms, and dynamic programming problems are2 H8 i2 y$ P( t" b: x. s/ y8 `
explored in great detail.9 ]% i1 J* o: E1 K1 ~# ~% [/ o
" C, x6 ^0 I! N& `. S
* Z; j; E9 ]7 o( Z; m