The motivation for writing this book was the lack of resources available about data & y- y, l9 u( q, D* F! Kstructures and algorithms written in JavaScript. This was strange to me because ) a* G& D& ?" n8 n) v9 m, T, Xtoday many of the job opportunities for software development require knowledge of5 p2 D+ @, G/ a
JavaScript; it is the only language that can be used to write the entire stack, including the: M# l7 c ?( u' a, j# q5 n
front-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript 4 P- D& Y4 V% Y6 A9 S$ z2 ]; i' Fdevelopers to understand how data structures work and how to design algorithms to; d7 F& W1 V. o) I1 J. n: e4 {- v
build applications.8 n, y! Q U, q1 s. F# h
Therefore, this book aims to teach data structure and algorithm concepts from* f, S A2 S% |$ h: s# v6 m6 o" q
computer science for JavaScript rather than for the more typical Java or C++. Because/ ]- e! [, s" H. U- k
JavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow / {3 V9 \% U7 b9 Uthe inheritance pattern), there are some changes in writing data structures in JavaScript.2 [" h9 C5 {& p2 W
The classical inheritance pattern allows inheritance by creating a blueprint-like ! M( l3 {2 O& v- y+ O' {form - v0 N: L! Z' r* j% Dthat objects follow during inheritance. However, the prototypal inheritance pattern U4 ?" _3 J( v* A4 @ Jmeans copying the objects and changing their properties.- h, b+ n; f5 R i8 x
This book first covers fundamental mathematics for Big-O analysis and then lays out. Q! g, s) y9 v
the basic JavaScript foundations, such as primitive objects and types. Then, this book 2 e8 H, e, x. g% _covers implementations and algorithms for fundamental data structures such as linked 6 n/ u" F j/ Q: k; |lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient8 X: T! z+ M' a# w5 M
string search algorithms, caching algorithms, and dynamic programming problems are% Q2 L) b3 `; R6 d; v
explored in great detail. 7 F* V* \% l! K8 f Z( s : }/ U- K5 m* S# b2 y- \& F! i, i6 a; l6 p