The motivation for writing this book was the lack of resources available about data9 @3 a: E8 N, d7 U/ N$ x9 U
structures and algorithms written in JavaScript. This was strange to me because& ?# G _) \$ v3 o# R
today many of the job opportunities for software development require knowledge of C5 ~4 P( M! DJavaScript; it is the only language that can be used to write the entire stack, including the 9 A; p: g( F! D; cfront-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript 6 S; n. r: t6 c8 ^4 f+ ]0 _developers to understand how data structures work and how to design algorithms to r' C" B2 C+ z! i* ?9 ?8 V P) Nbuild applications.4 ]4 a. l( S8 D0 l8 h0 z+ q
Therefore, this book aims to teach data structure and algorithm concepts from 2 r+ _, G1 ]$ l& zcomputer science for JavaScript rather than for the more typical Java or C++. Because8 j3 X n/ e2 y
JavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow% G. T" p! a( b/ H
the inheritance pattern), there are some changes in writing data structures in JavaScript. 4 H# R4 ?1 ~& ~; L+ gThe classical inheritance pattern allows inheritance by creating a blueprint-like : b& o" T8 P `. o% {) z) {form # y& S, i/ N0 n- E2 [8 [that objects follow during inheritance. However, the prototypal inheritance pattern " J* L9 [( [% K+ U: \means copying the objects and changing their properties./ g# p0 J1 D7 K$ { ~
This book first covers fundamental mathematics for Big-O analysis and then lays out, O) P" e+ L2 x. X& N% s+ T
the basic JavaScript foundations, such as primitive objects and types. Then, this book B$ U, j$ j- C
covers implementations and algorithms for fundamental data structures such as linked * p! c; c# g% t, h. K6 Olists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient 9 Z: ^: x) G. R) kstring search algorithms, caching algorithms, and dynamic programming problems are * ]3 ^2 n' y! s1 A% m! Yexplored in great detail.8 h/ |! ^) w5 H/ U5 G. B9 a+ s, |$ {
) N! t5 X& a/ |8 R' t8 m; b- [