The motivation for writing this book was the lack of resources available about data / @/ j, k( p8 q* l5 R3 N6 M, zstructures and algorithms written in JavaScript. This was strange to me because 0 ~. Z0 |0 i8 r4 Stoday many of the job opportunities for software development require knowledge of 3 z. n! v ~+ LJavaScript; it is the only language that can be used to write the entire stack, including the 1 b! {5 Y# x. Lfront-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript ! ~8 \( m' L7 ^- Z' P% `1 N$ @developers to understand how data structures work and how to design algorithms to+ K" x4 K) s# M0 d2 V$ t/ B, ?' R
build applications.& w. I: \- I# R/ V ?4 b
Therefore, this book aims to teach data structure and algorithm concepts from + T2 W9 ~% v- R6 W. W. W4 \/ `* scomputer science for JavaScript rather than for the more typical Java or C++. Because 8 O2 L- o( g3 D. s$ Q- h; VJavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow0 @9 o9 Q8 |+ i4 p) g- _, t( F C
the inheritance pattern), there are some changes in writing data structures in JavaScript. 0 P5 q% _8 [* T* m. e: L4 k3 x+ ZThe classical inheritance pattern allows inheritance by creating a blueprint-like 5 N$ v" I% K# gform5 @5 w# t* h3 _8 J8 W- F- v9 I/ v% @
that objects follow during inheritance. However, the prototypal inheritance pattern6 _% n) `, `+ Y# \
means copying the objects and changing their properties. 2 |- I u* n3 H) l7 {/ Y8 PThis book first covers fundamental mathematics for Big-O analysis and then lays out ( U; U6 b) P+ F6 Z$ G3 [0 j Rthe basic JavaScript foundations, such as primitive objects and types. Then, this book % B f' o4 W. ^! m- t" |covers implementations and algorithms for fundamental data structures such as linked 8 y W6 N4 N9 P3 nlists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient6 Q" F" y6 h7 [ A7 T
string search algorithms, caching algorithms, and dynamic programming problems are " A* t' ` s3 h0 l8 O8 aexplored in great detail. 2 I! e( R& X l2 L* Z9 @2 [- c& ~0 I* _6 @