The motivation for writing this book was the lack of resources available about data/ t; N: |& K7 ]3 k) t- Q% G8 ^! c8 d
structures and algorithms written in JavaScript. This was strange to me because! g4 o5 n9 B' v8 f3 x
today many of the job opportunities for software development require knowledge of 5 g6 ~+ C0 Z! F/ f& LJavaScript; it is the only language that can be used to write the entire stack, including the6 V! t# f' U3 c, e3 b
front-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript / u0 x6 D. Z1 ]; ^( rdevelopers to understand how data structures work and how to design algorithms to. ^; n0 x$ G7 [, H% C4 j
build applications. 1 i2 X' \, J# o) Z+ O0 k4 V9 NTherefore, this book aims to teach data structure and algorithm concepts from! f; ^/ C6 R, W; Z: P, |; J2 {
computer science for JavaScript rather than for the more typical Java or C++. Because% d6 y: G8 Q. r! T& d, V
JavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow % R. d' @) f& c, ^the inheritance pattern), there are some changes in writing data structures in JavaScript.) @; J5 H" G# X0 U- `
The classical inheritance pattern allows inheritance by creating a blueprint-like + e% [ x) L4 J- b) K# w) Cform' v* Q2 l% v- m* h
that objects follow during inheritance. However, the prototypal inheritance pattern 7 l A8 f$ o- Q. q v' nmeans copying the objects and changing their properties., V' U3 J- J: \4 ~7 z" [& @5 M
This book first covers fundamental mathematics for Big-O analysis and then lays out; Q/ T5 L; W8 B6 j# i$ V
the basic JavaScript foundations, such as primitive objects and types. Then, this book " s* V0 x+ `0 b( Bcovers implementations and algorithms for fundamental data structures such as linked + i/ W! W( m% ]. ?) ]lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient 7 {* W8 H8 j/ ^- m" b$ U% _4 Istring search algorithms, caching algorithms, and dynamic programming problems are ! U. g* O9 B: [3 Hexplored in great detail.! A5 \6 O" F2 c