The motivation for writing this book was the lack of resources available about data 0 Y+ B2 }2 w% o! ^structures and algorithms written in JavaScript. This was strange to me because ( w! `) o5 [! j$ V' Y% q! ^" {) `* dtoday many of the job opportunities for software development require knowledge of+ _4 ?! l G$ ]
JavaScript; it is the only language that can be used to write the entire stack, including the 8 n; ]. L8 `! G, jfront-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript % ~* q8 K1 k- H' c5 [ [) ~developers to understand how data structures work and how to design algorithms to + Y1 G a4 N& sbuild applications. % T3 f. j" f+ y' A1 UTherefore, this book aims to teach data structure and algorithm concepts from ) x0 P7 Q# f0 b Y5 [3 ]! xcomputer science for JavaScript rather than for the more typical Java or C++. Because 8 I( C5 Y$ U+ k. B. d, fJavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow 6 Z: |4 q# X X# a" J; Nthe inheritance pattern), there are some changes in writing data structures in JavaScript.2 R" C, e% Y: Q7 L
The classical inheritance pattern allows inheritance by creating a blueprint-like5 t, [8 H& w7 Q+ ]
form) v& d8 J+ e, S, c
that objects follow during inheritance. However, the prototypal inheritance pattern1 V! D' _( i( l
means copying the objects and changing their properties.$ ^$ f( b7 y7 t1 U
This book first covers fundamental mathematics for Big-O analysis and then lays out 8 n. G. `/ ~ @the basic JavaScript foundations, such as primitive objects and types. Then, this book! [, G3 M$ o3 J: q
covers implementations and algorithms for fundamental data structures such as linked) K; T) ]1 p3 _- R7 ~
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient 4 V* ]8 H1 U' @string search algorithms, caching algorithms, and dynamic programming problems are% a% A4 M9 V$ l" H1 Z' t, S2 @
explored in great detail. 8 P9 ]( _' y+ `0 t+ a8 X 1 q) C! X/ S0 M9 K4 ~3 f1 D: d