Book description
Increase your productivity by implementing complex data structures and algorithms using JavaScript
About This Book
- A step by step guide, which will provide you with a thorough discussion on the analysis and design of fundamental JavaScript data structures
- Get a better understanding of advanced concepts such as space and time complexity to optimize your code
- Focus more on solving the business problem and less on the technical challenges involved
Who This Book Is For
If you are a JavaScript developer looking for practical examples to implement data structures and algorithms in your web applications, then this book is for you. Familiarity with data structures and algorithms will be helpful to get the most out of this book.
What You Will Learn
- Build custom Back buttons embedded within your application
- Build part of a basic JavaScript syntax parser and evaluator for an online IDE
- Build a custom activity user tracker for your application
- Generate accurate recommendations for credit card approval using Decision Trees
- Simplify complex problems using a graphs
- Increase the performance of an application using micro-optimizations
In Detail
Data structures and algorithms are the fundamental building blocks of computer programming. They are critical to any problem, provide a complete solution, and act like reusable code. Using appropriate data structures and having a good understanding of algorithm analysis are key in JavaScript to solving crises and ensuring your application is less prone to errors.
Do you want to build applications that are high-performing and fast? Are you looking for complete solutions to implement complex data structures and algorithms in a practical way? If either of these questions rings a bell, then this book is for you!
You'll start by building stacks and understanding performance and memory implications. You will learn how to pick the right type of queue for the application. You will then use sets, maps, trees, and graphs to simplify complex applications. You will learn to implement different types of sorting algorithm before gradually calculating and analyzing space and time complexity. Finally, you'll increase the performance of your application using micro optimizations and memory management.
By the end of the book you will have gained the skills and expertise necessary to create and employ various data structures in a way that is demanded by your project or use case.
Style and approach
Step-by-step topics will help you get started with solutions for implementing classic data structures and algorithms. Learn by doing with hands-on code snippets that give you practical experience of the subject.
Table of contents
- Preface
- Building Stacks for Application State Management
- Creating Queues for In-Order Executions
- Using Sets and Maps for Faster Applications
- Using Trees for Faster Lookup and Modifications
- Simplify Complex Applications Using Graphs
-
Exploring Types of Algorithms
- Creating a Node.js application
-
Use cases
- Using recursion to serialize data
- Using Dijkstra to determine the shortest path
- Using BFS to determine relationships
- Using dynamic programming to build a financial planner
- Using a greedy algorithm to build a travel itinerary
- Using branch and bound algorithm to create a custom shopping list
- When not to use brute-force algorithm
- Summary
- Sorting and Its Applications
- Big O Notation, Space, and Time Complexity
-
Micro-Optimizations and Memory Management
-
Best practices
-
Best practices for HTML
- Declaring the correct DOCTYPE
- Adding the correct meta-information to the page
- Dropping unnecessary attributes
- Making your app mobile ready
- Loading style sheets in the <head>
- Avoiding inline styles
- Using semantic markup
- Using Accessible Rich Internet Applications (ARIA) attributes
- Loading scripts at the end
- CSS best practices
- Best practices for JavaScript
-
Best practices for HTML
- HTML optimizations
- CSS optimizations
- JavaScript optimizations
- Summary
- What's next?
-
Best practices
- Other Books You May Enjoy
Product information
- Title: Hands-On Data Structures and Algorithms with JavaScript
- Author(s):
- Release date: January 2018
- Publisher(s): Packt Publishing
- ISBN: 9781788398558
You might also like
book
Data Structures and Algorithms with JavaScript
As an experienced JavaScript developer moving to server-side programming, you need to implement classic data structures …
book
Learning JavaScript Data Structures and Algorithms
Understand and implement classic data structures and algorithms using JavaScript In Detail A data structure is …
book
Learning JavaScript Data Structures and Algorithms - Third Edition
Create classic data structures and algorithms such as depth-first search and breadth-first search, learn recursion, as …
book
Learning JavaScript Data Structures and Algorithms - Second Edition
Hone your skills by learning classic data structures and algorithms in JavaScript About This Book Understand …