The motivation for writing this book was the lack of resources available about data 8 c4 [+ T9 G1 K' w9 ^5 s) h& xstructures and algorithms written in JavaScript. This was strange to me because 9 s1 I8 [; ]# qtoday many of the job opportunities for software development require knowledge of& r. W7 x& e$ X, O9 b
JavaScript; it is the only language that can be used to write the entire stack, including the # B/ l* k/ e6 ?2 O0 nfront-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript ' N" w; \- d0 E1 ]developers to understand how data structures work and how to design algorithms to8 R/ w2 T$ b: i* x/ s; D
build applications. 4 z0 U& _( D9 G6 ]; tTherefore, this book aims to teach data structure and algorithm concepts from- \9 s! W/ _: ]& ?8 P4 x* X
computer science for JavaScript rather than for the more typical Java or C++. Because / ^- {5 V6 J( w# g3 \8 O0 nJavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow - N# A9 a1 u9 b& `the inheritance pattern), there are some changes in writing data structures in JavaScript. ' I! q2 h0 a! P( X/ z2 H. DThe classical inheritance pattern allows inheritance by creating a blueprint-like ! z# B# b5 o$ f- F ?1 [) }form @9 A' t$ e0 g$ \$ X# n, ~1 g
that objects follow during inheritance. However, the prototypal inheritance pattern2 L/ I+ Y6 r3 |4 W9 f+ {
means copying the objects and changing their properties.9 r: O6 b& I1 A
This book first covers fundamental mathematics for Big-O analysis and then lays out R$ E9 [% Z$ e5 D5 E# ]" kthe basic JavaScript foundations, such as primitive objects and types. Then, this book {7 @! d, L# Q
covers implementations and algorithms for fundamental data structures such as linked & ^- R% O" S b) y. }% flists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient" ]. A. ^ Q5 h+ u" V( U
string search algorithms, caching algorithms, and dynamic programming problems are ( q% b' N a" m1 _/ R8 O: c) x7 pexplored in great detail. ! k& [ j. p& j, D, W) P# i. B$ G' T- m7 }
. U/ j+ y$ P/ X# f* u9 ^) T6 N