The motivation for writing this book was the lack of resources available about data 7 T3 j8 @3 Z6 s/ q2 A# ^* I* |# `structures and algorithms written in JavaScript. This was strange to me because3 E* P4 y$ q5 ` J/ }5 [
today many of the job opportunities for software development require knowledge of- o$ C0 U" ^6 [- _3 {5 Y" v7 K
JavaScript; it is the only language that can be used to write the entire stack, including the4 M R, P' B2 i+ }0 _4 k4 n8 H
front-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript v" V0 p! `- @% K# T4 S( C
developers to understand how data structures work and how to design algorithms to' k# Q; n9 k" Z9 x
build applications.: ?3 q+ h! K; P: ]7 J' i
Therefore, this book aims to teach data structure and algorithm concepts from " I$ Z5 l7 ?7 _6 }& @computer science for JavaScript rather than for the more typical Java or C++. Because+ y% L2 @# x9 R& ^' n2 `
JavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow 7 Z: ~/ H ?4 W/ Sthe inheritance pattern), there are some changes in writing data structures in JavaScript.4 H3 I$ a* r2 D; r5 J
The classical inheritance pattern allows inheritance by creating a blueprint-like, u" C1 o# b, `1 g
form$ ]' }( a, T) m( t
that objects follow during inheritance. However, the prototypal inheritance pattern : I# S! [( W& d) imeans copying the objects and changing their properties. ' f' b2 o; q5 v9 pThis book first covers fundamental mathematics for Big-O analysis and then lays out # @6 x. G1 M" rthe basic JavaScript foundations, such as primitive objects and types. Then, this book1 U3 u1 v2 `1 R: b
covers implementations and algorithms for fundamental data structures such as linked- m7 Q: e( b Y! d- v3 m& o# U
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient 4 j8 J6 p4 o2 estring search algorithms, caching algorithms, and dynamic programming problems are4 w% b; P- j% k8 g4 T
explored in great detail. % n" R$ Q& G: D4 P: y3 Y: N7 n {: z9 Y1 L9 f0 c3 @ `1 o
2 |" g* J9 E" U