The motivation for writing this book was the lack of resources available about data : k, |7 F: ]3 k2 K) e$ Zstructures and algorithms written in JavaScript. This was strange to me because8 ^5 V" c% N6 V7 R1 ^
today many of the job opportunities for software development require knowledge of / N- d0 y: L9 DJavaScript; it is the only language that can be used to write the entire stack, including the % u& N0 A) [ V& R) x) Y/ hfront-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript : c7 S8 T- U. Zdevelopers to understand how data structures work and how to design algorithms to ! m. e5 }( x$ @/ E) ^. l _' Ubuild applications. 0 r% j3 e3 V. m% _2 ZTherefore, this book aims to teach data structure and algorithm concepts from , K- p5 v- ^4 S! X8 Bcomputer science for JavaScript rather than for the more typical Java or C++. Because / X" U: f8 s2 K1 H' PJavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow 9 n# S( B2 W u' O! athe inheritance pattern), there are some changes in writing data structures in JavaScript.( d' f$ w1 A3 n5 l, {( a- I
The classical inheritance pattern allows inheritance by creating a blueprint-like ( z* C/ k" L- @3 n4 Cform ; o! } f) @) z0 V5 `' G& G' ]$ ^that objects follow during inheritance. However, the prototypal inheritance pattern1 B" `# G5 S/ ]8 I
means copying the objects and changing their properties. ' v& q0 }9 _) C; Q. [0 N& O1 T c9 yThis book first covers fundamental mathematics for Big-O analysis and then lays out8 e; g- z+ ~+ W i$ h" O; n8 V3 }
the basic JavaScript foundations, such as primitive objects and types. Then, this book& _2 U- y$ o( b' t: ^
covers implementations and algorithms for fundamental data structures such as linked% i% B/ B) a2 E
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient " t# S6 {1 I) f+ ~1 J& P3 E {string search algorithms, caching algorithms, and dynamic programming problems are+ q% J1 p+ V m2 o
explored in great detail.+ Z9 o" l+ w/ D9 |" q
" E. p$ ~/ t: K) |4 |
Y( O' F5 P8 ^% X