The motivation for writing this book was the lack of resources available about data' {9 v+ U; s, \6 e
structures and algorithms written in JavaScript. This was strange to me because 4 q1 Q* c# ~/ i& ~! Y4 F' htoday many of the job opportunities for software development require knowledge of7 f! G4 [4 P; a. {( G
JavaScript; it is the only language that can be used to write the entire stack, including the & B5 } g+ v2 q9 k4 q- ?front-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript / t+ N1 x2 t hdevelopers to understand how data structures work and how to design algorithms to6 t+ L# n- ^3 u
build applications. ) t: K6 N/ d& c+ x" T* sTherefore, this book aims to teach data structure and algorithm concepts from ) \) Q" @+ B8 s4 P$ rcomputer science for JavaScript rather than for the more typical Java or C++. Because5 y3 k4 t6 Y2 C! k m5 J
JavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow( {4 r2 x9 z8 H
the inheritance pattern), there are some changes in writing data structures in JavaScript.. N/ T/ D" K- f2 A
The classical inheritance pattern allows inheritance by creating a blueprint-like& z; C, |! U* D7 o2 j
form. V- U# M, d) }, O1 K6 L
that objects follow during inheritance. However, the prototypal inheritance pattern 4 p% A( @/ g1 B9 J) n! q K( |means copying the objects and changing their properties.8 |! ?+ n/ M, p; V- ]3 {8 H& |
This book first covers fundamental mathematics for Big-O analysis and then lays out# |, [% H3 K: w# |- x
the basic JavaScript foundations, such as primitive objects and types. Then, this book ) i2 S& Z; U$ t4 ^' O" bcovers implementations and algorithms for fundamental data structures such as linked( `8 P2 r, _8 _9 }. {
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient % _4 Q! u) e% { a$ L. Hstring search algorithms, caching algorithms, and dynamic programming problems are ! D/ P6 i' ~0 [3 ~7 b! H& gexplored in great detail. I$ J1 P1 \+ K! t