▶Book Description
A data structure is a particular way of organizing data in a computer to utilize resources efficiently. Data structures and algorithms are the base of every solution to any programming problem. With this book, you will learn to write complex and powerful code using the latest ES 2017 features.
Learning JavaScript Data Structures and Algorithms begins by covering the basics of JavaScript and introduces you to ECMAScript 2017, before gradually moving on to the most important data structures such as arrays, queues, stacks, and linked lists. You will gain in-depth knowledge of how hash tables and set data structures function as well as how trees and hash maps can be used to search files in an HD or represent a database. This book serves as a route to take you deeper into JavaScript. You'll also get a greater understanding of why and how graphs, one of the most complex data structures, are largely used in GPS navigation systems in social networks.
Toward the end of the book, you'll discover how all the theories presented in this book can be applied to solve real-world problems while working on your own computer networks and Facebook searches.
▶What You Will Learn
⦁ Declare, initialize, add, and remove items from arrays, stacks, and queues
⦁ Create and use linked lists, doubly linked lists, and circular linked lists
⦁ Store unique elements with hash tables, dictionaries, and sets
⦁ Explore the use of binary trees and binary search trees
⦁ Sort data structures using algorithms such as bubble sort, selection sort, insertion sort, merge sort, and quick sort
⦁ Search elements in data structures using sequential sort and binary search
▶Key Features
⦁ Implement common data structures and the associated algorithms along with the context in which they are used
⦁ Master existing JavaScript data structures such as arrays, sets, and maps, and learn how to implement new ones such as stacks, linked lists, trees, and graphs in ES 8
⦁ Develop abstract data types to make JavaScript a more flexible and powerful programming language
▶Who This Book Is For
If you are a student of computer science or are at the start of your technology career and want to explore JavaScript’s optimum ability, this book is for you. If you are already familiar with programming, but want to hone your skills on algorithms and data structures, this book is also for you.
You just need a basic knowledge of JavaScript and programming logic to start having fun with algorithms.
▶What this book covers
⦁ Chapter 1, JavaScript - A Quick Overview, covers the basics of JavaScript needed prior to learning data structures and algorithms. It also covers the setup of the development environment needed for this book.
⦁ Chapter 2, ECMAScript and TypeScript Overview, covers some new JavaScript functionalities introduced since 2015 and also covers the basic functionalities of TypeScript, a JavaScript superset.
⦁ Chapter 3, Arrays, explains how to use the most basic and most used data structure, which are the arrays. This chapter demonstrates how to declare, initialize, add, and remove elements from an array. It also covers how to use native JavaScript Array methods.
⦁ Chapter 4, Stacks, introduces the stack data structure, demonstrating how to create a stack and add and remove elements. It also demonstrates how to use stack to solve some computer science-related problems.
⦁ Chapter 5, Queues and Deques, covers the queue data structure, demonstrating how to create a queue and add and remove its elements. It covers the deque data structure, a special type of the queue. It also demonstrates how to use queue to solve some computer science-related problems and the major differences between queues and stacks.
⦁ Chapter 6, Linked Lists, explains how to create the linked list data structure from scratch using objects and "pointer" concept. Besides covering how to declare, create, add, and remove elements, it also covers the various types of linked lists, such as the doubly linked list and circular linked list.
⦁ Chapter 7, Sets, introduces the set data structure and how it can be used to store nonrepeated elements. It also explains the different types of set operations and how to implement and use them.
⦁ Chapter 8, Dictionaries and Hashes, explains the dictionary and hash data structures and the differences between them. This chapter covers how to declare, create, and use both data structures. It also explains how to handle collisions in hash and techniques for creating better hash functions.
⦁ Chapter 9, Recursion, introduces the concept of recursion and demonstrates the differences between declarative and recursive algorithms.
⦁ Chapter 10, Trees, covers the tree data structure, its terminology, focusing on Binary Search Tree data—its methods to search, traverse, add, and remove nodes. It also introduces selfbalancing trees, such as the AVL and Red-Black trees.
⦁ Chapter 11, Binary Heap and Heap Sort, covers the min heap and max heap data structures, how to use the heap as a priority queue, and discusses the famous heap sort algorithm.
⦁ Chapter 12, Graphs, introduces the amazing world of graphs and its application in realworld problems. This chapter covers the most common graph terminology, the different way of representing a graph, how to traverse graphs using the Breadth-First Search and Depth-First Search algorithms and its applications.
⦁ Chapter 13, Sorting and Searching Algorithms, explores the most used sorting algorithms, such as the Bubble sort (and its improved version), Selection sort, Insertion sort, Merge sort, and Quick sort. It also covers the counting and radix sort, two distributed sorting algorithms. It also covers how to search algorithms, such as the sequential and binary search, and how to shuffle arrays.
⦁ Chapter 14, Algorithm Designs and Techniques, introduces some algorithm techniques and some of the most famous algorithms. It also covers an introduction to functional programming in JavaScript.
⦁ Chapter 15, Algorithm Complexity, introduces the Big-O notation and its concepts along with a cheat sheet of the complexity of the algorithms implemented in this book. It covers an introduction to NP-Completeness problems and heuristic solutions. At last, it explains how to take your algorithm knowledge to the next level.