The motivation for writing this book was the lack of resources available about data & O* N! f" I- L9 hstructures and algorithms written in JavaScript. This was strange to me because/ i) [/ l1 a% t1 }4 n- w
today many of the job opportunities for software development require knowledge of / X0 I# S* L" D7 sJavaScript; it is the only language that can be used to write the entire stack, including the [ ?9 {$ i0 g% lfront-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript! S9 i# N# E M! M5 _8 U* J
developers to understand how data structures work and how to design algorithms to( V- M( `9 @) d3 c4 a. ^
build applications. % d% G* t$ K$ PTherefore, this book aims to teach data structure and algorithm concepts from / o# z }5 k$ i4 S$ _computer science for JavaScript rather than for the more typical Java or C++. Because# p0 _) }. B6 }) r* S
JavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow 4 m: a c+ U+ o* C# J( ithe inheritance pattern), there are some changes in writing data structures in JavaScript. 7 {! t5 v1 j1 w+ d- GThe classical inheritance pattern allows inheritance by creating a blueprint-like ( W1 H& X6 W3 x9 ?' @form8 {0 H8 m, U7 q; } T, y
that objects follow during inheritance. However, the prototypal inheritance pattern6 U) R8 S) {! S: [5 k* D. G4 x
means copying the objects and changing their properties. 4 m. p1 p) N3 V/ v$ |9 s5 SThis book first covers fundamental mathematics for Big-O analysis and then lays out# ~# l% B# U5 D1 S3 {3 w' L
the basic JavaScript foundations, such as primitive objects and types. Then, this book " J6 F, c ^7 r7 X1 Y/ Ecovers implementations and algorithms for fundamental data structures such as linked6 J: x6 m( a& s+ R) {2 N
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient: A* a/ K+ V' ?! [6 i$ v) R
string search algorithms, caching algorithms, and dynamic programming problems are - x) ?! V# T9 z: @explored in great detail. 8 e7 _. B( a2 S- `* y% x. S# t- J 2 V0 O& A; K. \ & m0 ~, r" J2 [& i' p