The motivation for writing this book was the lack of resources available about data ! ^, n( V; t g$ ystructures and algorithms written in JavaScript. This was strange to me because m' I$ A: v4 f+ o5 B3 Stoday many of the job opportunities for software development require knowledge of8 @2 E) @$ D4 O* M
JavaScript; it is the only language that can be used to write the entire stack, including the1 d9 z y, `1 E, T( q" i) j
front-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript * u: R* p3 K$ U' n( Hdevelopers to understand how data structures work and how to design algorithms to 4 ]4 \' N" f+ U. s% g4 dbuild applications. / n C$ O( q A9 v7 r( ~Therefore, this book aims to teach data structure and algorithm concepts from 3 v" J* S6 q9 M) K8 jcomputer science for JavaScript rather than for the more typical Java or C++. Because* k- p. M. O& \8 Q
JavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow 2 n4 ^: ~! j/ u" t% `. Xthe inheritance pattern), there are some changes in writing data structures in JavaScript. 8 s( u& |1 ^/ }4 K1 ~+ u! IThe classical inheritance pattern allows inheritance by creating a blueprint-like/ T4 a, t' t! Z6 ?" I- J. Q' P; W3 r
form ( j3 V0 g9 i, ^" g2 N/ ethat objects follow during inheritance. However, the prototypal inheritance pattern: F2 N* P( ^$ x6 C- N2 d
means copying the objects and changing their properties. 5 N/ Q7 N1 v" H* r* LThis book first covers fundamental mathematics for Big-O analysis and then lays out ! e$ X5 k E( n1 S9 n( d' m# o5 J9 kthe basic JavaScript foundations, such as primitive objects and types. Then, this book $ G- O2 b; i) Wcovers implementations and algorithms for fundamental data structures such as linked7 }; c6 E& B$ V
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient : y t: i- J3 \# E7 _6 u( nstring search algorithms, caching algorithms, and dynamic programming problems are* X, z$ F3 N0 g" W, y( o
explored in great detail.! ~) u( H1 M3 f( w2 r
3 `/ t, }6 r" l9 Y8 Y: a" @; _0 z9 @( O ~6 _& i8 y