The motivation for writing this book was the lack of resources available about data / |; K: `8 v. t/ Q. kstructures and algorithms written in JavaScript. This was strange to me because1 Z5 x, \* x4 i' m0 A
today many of the job opportunities for software development require knowledge of : m( L$ X) X: `JavaScript; it is the only language that can be used to write the entire stack, including the 9 o4 ~% Q- t$ u# Q& U e/ ~front-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript3 G V' u% L! V& K
developers to understand how data structures work and how to design algorithms to 8 V' q3 s O3 @9 I0 K& sbuild applications., w& ` A9 y9 q9 h! h
Therefore, this book aims to teach data structure and algorithm concepts from' k c! @! @# B
computer science for JavaScript rather than for the more typical Java or C++. Because % H6 g. D* {1 v* N: Z( a! D7 k3 bJavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow" `. F. i; a: m5 q2 _% M
the inheritance pattern), there are some changes in writing data structures in JavaScript. & Y( ^/ c) l, ~2 k5 z* dThe classical inheritance pattern allows inheritance by creating a blueprint-like : G+ O9 n6 g: tform - l( T5 N/ P8 P/ O% N6 z8 mthat objects follow during inheritance. However, the prototypal inheritance pattern- X, s1 G3 d) f( i: ~5 X" N
means copying the objects and changing their properties.- n0 h' n1 `/ P* l: w+ k/ }
This book first covers fundamental mathematics for Big-O analysis and then lays out # t6 O" v! B. g( mthe basic JavaScript foundations, such as primitive objects and types. Then, this book 8 Y5 r8 ~- y. h( T0 B) c' ccovers implementations and algorithms for fundamental data structures such as linked. ~6 r }6 V* N; e' R i
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient # P2 ^) W% M+ n- |string search algorithms, caching algorithms, and dynamic programming problems are 8 U# ?9 l5 Z3 v3 }2 [- Yexplored in great detail. 5 \1 X' I1 |6 B4 D5 s% O' `* k* ~' z
# w! e9 _9 F8 a' ^) M1 u