The motivation for writing this book was the lack of resources available about data0 ^) |( D& K# y! ^+ e" T( e g# s
structures and algorithms written in JavaScript. This was strange to me because - \1 `( G: s. Etoday many of the job opportunities for software development require knowledge of % |* V! |6 s+ l7 h7 f tJavaScript; it is the only language that can be used to write the entire stack, including the k/ p& n/ F' q4 C* m
front-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript# k9 G6 l% B0 ~8 @% C- P8 t1 o2 X
developers to understand how data structures work and how to design algorithms to & f( t# Q. [# a, D) W1 mbuild applications. % ~* o+ T0 X; h6 ^4 h* \. XTherefore, this book aims to teach data structure and algorithm concepts from , K0 ^+ p$ h2 \6 M [+ A) Z. P4 scomputer science for JavaScript rather than for the more typical Java or C++. Because 4 V3 b6 | o3 FJavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow 9 T4 g$ `: c/ _- m1 N. Y8 Bthe inheritance pattern), there are some changes in writing data structures in JavaScript.0 N3 i- [! C7 u
The classical inheritance pattern allows inheritance by creating a blueprint-like( S. \; \3 I A- ~) ^
form' ^1 W2 L2 K/ _# }. p& ?5 K) a+ }
that objects follow during inheritance. However, the prototypal inheritance pattern5 m. ~# v4 J+ f5 _& g
means copying the objects and changing their properties.; {: ~+ h8 N4 g- t' B7 Y4 `1 g
This book first covers fundamental mathematics for Big-O analysis and then lays out0 _& f* z1 @! y4 w5 t" N4 q
the basic JavaScript foundations, such as primitive objects and types. Then, this book4 L1 g2 y& z1 ]4 n Q& V1 N
covers implementations and algorithms for fundamental data structures such as linked 1 {* b2 Y* Q" R4 j$ Wlists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient / h! K% \% E& e- _$ _! \+ m6 F9 O8 Rstring search algorithms, caching algorithms, and dynamic programming problems are4 ]7 r% s. M! S' \" G
explored in great detail. ) U1 Z( ~: w4 f+ q( u% x r5 U/ b& U a" V, _