The motivation for writing this book was the lack of resources available about data 7 q, Q$ U' f3 w5 Hstructures and algorithms written in JavaScript. This was strange to me because 1 F7 {0 J# O) U" I4 M- vtoday many of the job opportunities for software development require knowledge of3 p5 [6 c0 J+ i1 r0 V+ l# U f9 ~+ ?- J
JavaScript; it is the only language that can be used to write the entire stack, including the " ^3 g7 j; F3 O# _. Vfront-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript' V, p5 G9 a" v6 a/ ]' R5 h) a* S! `
developers to understand how data structures work and how to design algorithms to 7 r4 V0 f1 N* qbuild applications. * h+ Q: T; W2 \& j- }Therefore, this book aims to teach data structure and algorithm concepts from; t5 T+ }$ Z3 ~; f3 u. O
computer science for JavaScript rather than for the more typical Java or C++. Because" s, m9 m) b, Q" _' M- |, g; W3 {
JavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow $ O( t* ~9 L3 C' ~* \the inheritance pattern), there are some changes in writing data structures in JavaScript. ?, W" D2 Y" \1 } ^, \ Q$ A4 T
The classical inheritance pattern allows inheritance by creating a blueprint-like4 I% U4 @9 @- @, Z+ y {! L
form! u$ d5 z1 M) w1 Q& [0 a9 b$ p
that objects follow during inheritance. However, the prototypal inheritance pattern8 t( `8 t; L+ c- r* ?$ B& v. V
means copying the objects and changing their properties.- w6 R9 H9 q, A2 o, K
This book first covers fundamental mathematics for Big-O analysis and then lays out 1 c8 D! {4 s2 n) l5 ]9 @: Sthe basic JavaScript foundations, such as primitive objects and types. Then, this book ; n# `4 q3 u5 M8 S6 x1 k) y) dcovers implementations and algorithms for fundamental data structures such as linked' _# c* |4 _+ h7 v% l; r0 q% U1 z6 \
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient7 r% y2 m3 s4 X, N+ J( X
string search algorithms, caching algorithms, and dynamic programming problems are+ U, m' O- V- _1 g1 x) `9 Q% u
explored in great detail.: R8 c, b% e/ W6 J; f" Q
: p, E m2 l" T. N, ?1 v0 X
3 D) a# V' h1 Z! s; r# n# ]" T