The motivation for writing this book was the lack of resources available about data - c! ?3 v$ t4 O1 M: n: zstructures and algorithms written in JavaScript. This was strange to me because , i& ~% c" L0 _2 K) N2 A! t% Mtoday many of the job opportunities for software development require knowledge of! V0 g: [7 w' G! V- I c, K4 c+ C N ~: q
JavaScript; it is the only language that can be used to write the entire stack, including the d8 g; J: X: T% s1 @5 c! I/ Mfront-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript . q( T3 O. F% n- y& y- adevelopers to understand how data structures work and how to design algorithms to* }9 W) I% M0 V; W
build applications.+ w3 @2 v3 C* v1 E& f! c6 ]
Therefore, this book aims to teach data structure and algorithm concepts from 3 `+ C3 z9 z4 C2 n+ i& F/ Pcomputer science for JavaScript rather than for the more typical Java or C++. Because - P6 \5 Q8 }/ O8 ?9 [" FJavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow - i1 t9 h( I! gthe inheritance pattern), there are some changes in writing data structures in JavaScript. 6 l; Y: c6 N4 ?: V( zThe classical inheritance pattern allows inheritance by creating a blueprint-like , v2 Z4 E; @/ E) [. eform # l8 y8 N+ I3 X/ ?) dthat objects follow during inheritance. However, the prototypal inheritance pattern+ Q M$ g: J3 P* U& T1 _/ n. t
means copying the objects and changing their properties. 3 W( }" K9 F6 S1 \6 ^. XThis book first covers fundamental mathematics for Big-O analysis and then lays out1 ?1 n; A) @9 ]9 @4 u
the basic JavaScript foundations, such as primitive objects and types. Then, this book# S# c$ m/ G) p) |4 C
covers implementations and algorithms for fundamental data structures such as linked" o& ~7 L+ Q% j" {- z
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient+ v' T `% s w( s& \( C2 `9 \3 `
string search algorithms, caching algorithms, and dynamic programming problems are ( S: v' z3 T8 _& U8 H- ^( Z. Nexplored in great detail./ w4 }2 H, t' _
; Z) N1 d# N- y