The motivation for writing this book was the lack of resources available about data - h( `) u+ H8 t; ]structures and algorithms written in JavaScript. This was strange to me because0 }) T; p& n' a p& |) }. F3 L
today many of the job opportunities for software development require knowledge of8 ^$ i3 i" d( z' B& F# c8 F. S
JavaScript; it is the only language that can be used to write the entire stack, including the) }# H1 I" @/ e/ W2 z0 @7 K
front-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript3 v% b4 y# D, o
developers to understand how data structures work and how to design algorithms to- I9 x, \3 p! _! ~1 R6 K
build applications./ ?8 M6 \5 q2 q8 Z N7 n4 R- Z
Therefore, this book aims to teach data structure and algorithm concepts from9 Y0 g, u* o) A8 b$ [- `( o
computer science for JavaScript rather than for the more typical Java or C++. Because 1 m" R8 c& V4 M2 w" Q* TJavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow" x; \" |5 \9 ^1 S$ A( [, _/ w
the inheritance pattern), there are some changes in writing data structures in JavaScript.3 t: l$ V2 X8 m0 P+ x- b
The classical inheritance pattern allows inheritance by creating a blueprint-like 6 e( @" s2 }( f- Lform - m7 X8 Z# p+ i% q8 r1 vthat objects follow during inheritance. However, the prototypal inheritance pattern8 X+ k. [4 U; O+ \! z
means copying the objects and changing their properties.2 |( [1 y9 f& j8 t1 {+ i# u
This book first covers fundamental mathematics for Big-O analysis and then lays out 0 O0 q4 }$ p6 X9 A5 kthe basic JavaScript foundations, such as primitive objects and types. Then, this book$ f4 N: |. I t7 e T- Q
covers implementations and algorithms for fundamental data structures such as linked q9 w1 F) V$ g! j7 T0 R0 {
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient * o$ } Q4 h# s" Ostring search algorithms, caching algorithms, and dynamic programming problems are5 X+ b; _$ x/ ?* X
explored in great detail./ f5 i6 d0 p) o7 ?