The motivation for writing this book was the lack of resources available about data; L, N0 J. R6 b" m& j/ M) g: @9 v
structures and algorithms written in JavaScript. This was strange to me because! i! ]( X! g. ?/ r& b3 H, K
today many of the job opportunities for software development require knowledge of 4 V7 N( g9 z& Z$ U3 D. j/ uJavaScript; it is the only language that can be used to write the entire stack, including the" W n# L7 [: R: C" [% u
front-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript8 E$ P' }% q" e/ E2 t9 u3 S
developers to understand how data structures work and how to design algorithms to E& A" D; o7 ^ T" i7 `. Fbuild applications. 6 o, Z# n6 z6 E7 m2 i8 p7 sTherefore, this book aims to teach data structure and algorithm concepts from & W# ~0 W" B6 M: o, ~2 C: M0 y dcomputer science for JavaScript rather than for the more typical Java or C++. Because 9 i3 @/ `# Y; Q1 I- aJavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow 4 R H; F2 j2 [4 Y/ Cthe inheritance pattern), there are some changes in writing data structures in JavaScript. - Z2 @5 T* r) I8 `9 gThe classical inheritance pattern allows inheritance by creating a blueprint-like 1 Z" x" o4 q- y, J* I" wform 0 f2 P6 Z X7 N5 z7 D! v* M0 Lthat objects follow during inheritance. However, the prototypal inheritance pattern , E. T1 x" X5 k6 }4 zmeans copying the objects and changing their properties.8 U m; h! s" z7 s& G1 u6 x$ `
This book first covers fundamental mathematics for Big-O analysis and then lays out 5 d* c. ]4 X6 R0 y! \9 t8 Mthe basic JavaScript foundations, such as primitive objects and types. Then, this book $ r# I, c9 h# P( ?! y8 Vcovers implementations and algorithms for fundamental data structures such as linked8 }' s4 I0 L7 s* t' E, f
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient0 Z2 q3 P O- B; l0 H
string search algorithms, caching algorithms, and dynamic programming problems are5 y9 W' `" K0 ?" [
explored in great detail. 5 x$ o* F1 u r6 G0 }9 h+ s/ d. V# }& k8 ~; U. A5 {) y4 ?7 l
8 g2 B. K( l3 e8 L' R3 n