The motivation for writing this book was the lack of resources available about data 8 K# U, K) R0 O$ I, N+ | Zstructures and algorithms written in JavaScript. This was strange to me because # x6 v. x5 Y$ `- Otoday many of the job opportunities for software development require knowledge of 2 [3 h3 w! r2 c* V* H5 LJavaScript; it is the only language that can be used to write the entire stack, including the 2 B& K# ?4 P f: Z) |$ G* m, I. Hfront-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript" J, k2 p. k" M8 c: d# n
developers to understand how data structures work and how to design algorithms to; Y p; Z- Q( p6 E9 J8 N! j- A
build applications. 6 @( j d, P [/ ~) ]( O) P3 bTherefore, this book aims to teach data structure and algorithm concepts from% }4 j4 B8 R G8 H4 P; j/ B- V
computer science for JavaScript rather than for the more typical Java or C++. Because + W# W- X2 y: g; g/ u0 }% ~JavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow3 \) X, Q6 C F5 G, w
the inheritance pattern), there are some changes in writing data structures in JavaScript. ) S) K. U5 {2 \: P$ TThe classical inheritance pattern allows inheritance by creating a blueprint-like7 ^2 [7 g1 d( O7 i7 S1 W
form 8 F4 P$ a& w# X/ P& m3 @that objects follow during inheritance. However, the prototypal inheritance pattern # o) Q" ]. I- l& W! `" n: M! Omeans copying the objects and changing their properties." `- w# G( C. [+ w6 ~
This book first covers fundamental mathematics for Big-O analysis and then lays out& P* b, G* {, i
the basic JavaScript foundations, such as primitive objects and types. Then, this book& r' _: p% x, U2 `
covers implementations and algorithms for fundamental data structures such as linked & r% a8 y" c1 \3 }( ^5 Rlists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient9 b$ d0 g3 j2 W4 W( @2 w
string search algorithms, caching algorithms, and dynamic programming problems are , N4 D8 D# j! S5 j1 Y# }, S' |, Nexplored in great detail. ; A7 `1 S5 x# c, J9 d* W & q- O) @" g% p6 n4 | # w3 J8 k3 o2 }, F Q; `