The Web Developer’s Guide to Data Structures and Algorithms
Oleksii Trekhleb, Sophia Shoemaker

#JavaScript
#Algorithms
As a JavaScript developer you might think you don’t need to learn about data structures or algorithms.
Did you know JavaScript itself (runtime + browser) uses things like a stack, a heap and a queue? The more you understand the JavaScript you use on a daily basis – really understand it, the better you can wield it’s power and make less mistakes. If you thought algorithms and data structures were just a computer science course that wasn’t necessary on a day to day basis as JavaScript developer, think again!
How To Read This Book
Each chapter covers an algorithm you might encounter in your work or at an interview. You can work through the algorithms one at a time or feel free to jump around.
What is an Algorithm
In this book, we’re going to write algorithms - the sets of steps that will solve specific problems for
us.
We constantly use algorithms in our everyday life. For example what if we’re somewhere on a street and want to get home to our apartment that is on the 20th floor? In order to achieve that we could do the following:
1. Take a WALK to your home.
2. Use STAIRS to go up to the 20th floor.
This is an algorithm. We’ve defined and used the set of steps that solve our task of getting home.
Contents
Appendix A: Quiz Answers
Appendix 8: Big O Times Comparison
Appendix C: Data Structures Operations Complexities
Appendix D: Array Sorting Algorithms Complexities









