The motivation for writing this book was the lack of resources available about data+ I/ L/ |) S! g7 r+ Y' d
structures and algorithms written in JavaScript. This was strange to me because6 E" f9 g1 t' X6 K: @- ^
today many of the job opportunities for software development require knowledge of8 n) _9 }- h: M$ D5 ]
JavaScript; it is the only language that can be used to write the entire stack, including the5 l/ B4 Z- b$ a' p! A
front-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript( X. d- z7 m6 a" a
developers to understand how data structures work and how to design algorithms to5 b) _: E. I, H( G0 w3 Z
build applications.! X* G- ]5 y) Q
Therefore, this book aims to teach data structure and algorithm concepts from 3 O6 c8 y* H; b; pcomputer science for JavaScript rather than for the more typical Java or C++. Because! T' L' E* ]; s: Y! }
JavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow 2 t; b' u* J( T u1 ?6 C: zthe inheritance pattern), there are some changes in writing data structures in JavaScript.) Z$ _3 r, O% c7 p" q
The classical inheritance pattern allows inheritance by creating a blueprint-like# \( {! A3 |0 N2 r2 x# i
form4 a9 H) z+ j, S: o
that objects follow during inheritance. However, the prototypal inheritance pattern 7 Z0 W0 T- I. Nmeans copying the objects and changing their properties. / s" P( K! J A" n8 i$ [This book first covers fundamental mathematics for Big-O analysis and then lays out & x* E3 y' J1 e2 v) Q9 Q5 ]* W3 K( vthe basic JavaScript foundations, such as primitive objects and types. Then, this book, e5 H# J4 @; U5 H9 i2 B$ o: N
covers implementations and algorithms for fundamental data structures such as linked# a* s F! l4 p( u
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient ?# j3 A' G& ?- N7 Fstring search algorithms, caching algorithms, and dynamic programming problems are2 z; q+ e4 P% b d, t
explored in great detail.% k6 N. H" e/ l5 f( W% i7 s5 }' u