The motivation for writing this book was the lack of resources available about data3 k+ d# Y4 F) ~
structures and algorithms written in JavaScript. This was strange to me because. g8 k0 g) P8 @2 ?
today many of the job opportunities for software development require knowledge of( d$ S4 O* H/ r7 y) P
JavaScript; it is the only language that can be used to write the entire stack, including the, d4 K& T6 M. G
front-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript" d) m! w9 b9 H) ]& P$ H
developers to understand how data structures work and how to design algorithms to, | |6 F( s$ P& Z! v7 Q) b/ x
build applications.6 c( F0 X/ T. Y. M( g& R2 l
Therefore, this book aims to teach data structure and algorithm concepts from# \. c# [; a1 x6 }% E4 ]8 q
computer science for JavaScript rather than for the more typical Java or C++. Because * Z" S' o' q) x; Z6 [. \% k3 bJavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow; C* q6 u I/ y s! V9 u2 f
the inheritance pattern), there are some changes in writing data structures in JavaScript. , ~! R `/ w8 b% O, ]The classical inheritance pattern allows inheritance by creating a blueprint-like 8 }8 |5 t9 }6 qform: w a. L# |0 y4 F) ~
that objects follow during inheritance. However, the prototypal inheritance pattern H: Y1 H/ h' ]9 [# ], P3 y& h
means copying the objects and changing their properties. , B. p) _8 T- r+ nThis book first covers fundamental mathematics for Big-O analysis and then lays out; T( y8 z) c: m6 ?; Q0 j, i2 {0 V
the basic JavaScript foundations, such as primitive objects and types. Then, this book 9 ]/ [) l i K/ Gcovers implementations and algorithms for fundamental data structures such as linked& Y8 v; ~6 G( @) @
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient! @6 j/ y9 M4 `/ n; Q/ i1 l4 M$ x
string search algorithms, caching algorithms, and dynamic programming problems are( T8 Y, h' L0 T! I( }: q
explored in great detail.9 C5 e4 L4 k5 ], b. K, R