The motivation for writing this book was the lack of resources available about data8 F! O7 ]! c5 _) ]' R
structures and algorithms written in JavaScript. This was strange to me because' p- i" @4 e1 G* B' r* P
today many of the job opportunities for software development require knowledge of 3 n0 U* [' R! Q1 YJavaScript; it is the only language that can be used to write the entire stack, including the- U/ W8 z" Y* g' _# f% a
front-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript # N3 }( c. \. A' O2 h: Z# ?- w5 Ndevelopers to understand how data structures work and how to design algorithms to- g! Z0 J6 @- g! W/ @
build applications. 5 f! R5 l( ~0 w U4 Q. Z8 `/ o$ k4 [6 rTherefore, this book aims to teach data structure and algorithm concepts from; R" {, `. a. B4 v5 _8 O
computer science for JavaScript rather than for the more typical Java or C++. Because & M( l( H" ?- G' I+ t y3 aJavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow 9 J u0 L, z* ^' H& cthe inheritance pattern), there are some changes in writing data structures in JavaScript.. X; ~# a* _4 B i
The classical inheritance pattern allows inheritance by creating a blueprint-like 4 m! N2 c2 E9 n5 d2 Xform. `/ T' t' Y: {: k3 c9 Y o) t
that objects follow during inheritance. However, the prototypal inheritance pattern , G N" Z8 G/ u @/ D N1 ~means copying the objects and changing their properties. 8 Z7 G8 |) i$ F" wThis book first covers fundamental mathematics for Big-O analysis and then lays out 1 L9 O5 R3 ?& w( q' Zthe basic JavaScript foundations, such as primitive objects and types. Then, this book, r4 }1 w) f3 r+ N+ j8 c" D
covers implementations and algorithms for fundamental data structures such as linked - e7 {4 U3 C: Y' M2 G ~2 \8 slists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient * g& F* \/ k4 [$ X; x1 ]9 Bstring search algorithms, caching algorithms, and dynamic programming problems are $ p) z+ r. s- hexplored in great detail. / F4 p5 ^0 Y$ M6 e' F# t $ Z8 }$ j- a9 V1 V" h) K/ i2 |5 p; v! `- I. ~