The motivation for writing this book was the lack of resources available about data . d6 q3 o' V7 b) _ F5 nstructures and algorithms written in JavaScript. This was strange to me because $ M1 w- }- p* V) Y) gtoday many of the job opportunities for software development require knowledge of. y! i7 g% w+ l
JavaScript; it is the only language that can be used to write the entire stack, including the 5 d s+ Q: Q6 [& H1 c8 C0 [7 xfront-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript6 k5 ~2 L/ X3 v' W3 l
developers to understand how data structures work and how to design algorithms to ( Q. y3 }8 W$ pbuild applications.% f9 a l4 n5 V
Therefore, this book aims to teach data structure and algorithm concepts from D) B: A+ h: U& K6 N G" H
computer science for JavaScript rather than for the more typical Java or C++. Because 6 e. a) }% j8 }4 a" ^7 D4 uJavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow- a6 [0 ^% T' d& P, ?
the inheritance pattern), there are some changes in writing data structures in JavaScript. 6 l+ j! U4 f" T) KThe classical inheritance pattern allows inheritance by creating a blueprint-like& ~) x4 G3 {: v8 R# q
form I- u$ a9 G7 Y0 H% M" w8 i6 ]
that objects follow during inheritance. However, the prototypal inheritance pattern# j8 X2 m, h6 ~: b7 T1 f
means copying the objects and changing their properties. ( f7 v/ S5 j# w% x6 C& u. GThis book first covers fundamental mathematics for Big-O analysis and then lays out0 X% X, E) l# O' [3 b5 ~
the basic JavaScript foundations, such as primitive objects and types. Then, this book0 o4 M) a* M' Y
covers implementations and algorithms for fundamental data structures such as linked( ]7 U3 R3 ?, _' O1 s3 v
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient2 u2 {& ?9 r9 S1 F2 u
string search algorithms, caching algorithms, and dynamic programming problems are" J7 x& m- z0 {
explored in great detail.. }. I3 S: D$ _" o2 P