The motivation for writing this book was the lack of resources available about data : X9 m. D8 I1 f& X1 | istructures and algorithms written in JavaScript. This was strange to me because* L- y! B/ L5 g2 S1 \
today many of the job opportunities for software development require knowledge of# i5 \- _# K8 Z, Y
JavaScript; it is the only language that can be used to write the entire stack, including the * H7 Z% D) B. B: g5 K1 nfront-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript 5 u( h( [$ q8 \ @; m/ u& @) Udevelopers to understand how data structures work and how to design algorithms to ' _- [$ W8 A. y0 o5 D) Ibuild applications.4 T' p6 n- U+ N/ U0 q4 V) Z
Therefore, this book aims to teach data structure and algorithm concepts from# z# y2 O/ A& q6 H/ _' H y: D$ d
computer science for JavaScript rather than for the more typical Java or C++. Because, ]' l! J0 z( b+ `9 f
JavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow! e: M7 ?( e ~3 c5 O! C
the inheritance pattern), there are some changes in writing data structures in JavaScript. ( B+ D7 G/ G4 l9 `1 _The classical inheritance pattern allows inheritance by creating a blueprint-like 5 K4 d: F/ D+ a: y9 ?4 T5 Tform 3 H. n5 K4 g9 n' A1 R* othat objects follow during inheritance. However, the prototypal inheritance pattern% R: V- G% f; }( L, e
means copying the objects and changing their properties.* \9 b1 k( J3 h
This book first covers fundamental mathematics for Big-O analysis and then lays out- |! l2 U0 p# p
the basic JavaScript foundations, such as primitive objects and types. Then, this book6 y# h1 s4 n# J/ G8 ~0 N
covers implementations and algorithms for fundamental data structures such as linked * E5 {( i2 ?0 }+ Jlists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient, [9 ~" m; J# H0 o. X [6 G4 U" D6 `* M
string search algorithms, caching algorithms, and dynamic programming problems are ! Y& H' b# t$ l( oexplored in great detail. 8 a J# G4 h. W3 a) H$ L) M , e* n N8 c, T% r T% o) S e5 m- H8 j/ R% R2 g