The motivation for writing this book was the lack of resources available about data# |8 v' M( `. N1 u
structures and algorithms written in JavaScript. This was strange to me because" b3 X/ r; _9 @7 ~# \- p/ _1 n
today many of the job opportunities for software development require knowledge of 6 p/ f5 f4 w. x( h$ U9 y! }& UJavaScript; it is the only language that can be used to write the entire stack, including the % e" y1 s' c% _. w+ X: Dfront-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript+ X- S6 d& H9 Y9 g9 [
developers to understand how data structures work and how to design algorithms to - a- r" o) q( e' P" A. ybuild applications.* u. Z- Z" K* m$ U& w1 t
Therefore, this book aims to teach data structure and algorithm concepts from& N' q4 s0 f9 a K1 v) S. n
computer science for JavaScript rather than for the more typical Java or C++. Because 2 S; |1 x" b6 a y1 a1 tJavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow ' r$ s7 [2 z$ o5 E: hthe inheritance pattern), there are some changes in writing data structures in JavaScript.2 o3 _$ r7 j: h @
The classical inheritance pattern allows inheritance by creating a blueprint-like 9 q7 w+ x; \, Yform ! X+ t- a( i8 Rthat objects follow during inheritance. However, the prototypal inheritance pattern ; i( f6 r8 V/ T" L5 }means copying the objects and changing their properties.6 D& H/ p- F& K% |1 c& H
This book first covers fundamental mathematics for Big-O analysis and then lays out 2 O, O& t+ ? h: N9 u- Ythe basic JavaScript foundations, such as primitive objects and types. Then, this book $ _7 ~) J3 m+ ]1 D9 `6 Tcovers implementations and algorithms for fundamental data structures such as linked0 G" A, Z/ H6 N3 @
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient / X/ y0 h7 b% q4 U7 Kstring search algorithms, caching algorithms, and dynamic programming problems are % z: O+ b, }3 L6 @* q- _6 aexplored in great detail. . y% H- t- `( T% _" J+ \, I6 b& j6 T: j& E5 b
/ V; q1 f, j9 ^: p3 H