Software Development / Web Development

Find out how data structures and algorithms can be used to solve programming problems using JavaScript

15 Lessons

1 hours, 24 minutes

Intermediate

As businesses collect increasing amounts of vital data, the need to structure software components increases every day. Using appropriate data structures and having a good understanding of algorithm analysis is key to writing maintainable and extensible quality software, thus solving the crisis.

Learning JavaScript Data Structures and Algorithms will show you how to organize your code with the most appropriate data structures available to get the job done fast, and in a logical way that is easy to maintain, refactor, and test. By using effective data structures, you can take advantage of advanced algorithms, thus making your web applications more powerful and scalable. You will learn about common software engineering data structures, such as linked-lists, trees, and graphs, and get to know how to implement them in JavaScript. You’ll also master ways to use them in various types of algorithms.

You will begin by finding out how to build on native JavaScript constructs, and create collections such as maps, queues, stacks, sets, graphs, and other data structures. You will then discover how to develop, analyze, and improve algorithms to search deep trees, lists, and other complex collections, as well as sorting containers of data.

This practical course will guide you through a web application development cycle using a structured and disciplined approach, focusing on accuracy and efficiency as you build quality software.

- Introduction to Data Structures and AlgorithmsThe Course OverviewWho am I, and what is this course about. • Author introduces himself • This course will teach you what data structures and algorithms are, and how to use them in JavaScript • This course assumes that you are familiar with basic JavaScript concepts2:06What Are Data Structures and Algorithms?It is difficult to write complex software systems that run correctly. Most importantly, these systems must be easy to maintain and extend. Building software systems in a structured and efficient way helps to manage all three of the aforementioned problems. • Design each component in an organized and predictable way. In other words, use data structures as the main building blocks of your code architecture • Organize the operations to be performed on the data used in and by the system in a way that is self-contained, and easy to reason about. In other words, use efficient algorithms2:36Why Use Data Structures in JavaScript?JavaScript is used in large applications running in a browser and in Node.js. Without proper data structures, large code bases can be difficult to build accurately maintain. • Learn about common data structures • Write a simple implementation of common data structures that can be reused in real-world projects2:20Course Format and Datasets ContextsEach data structure is explained in this manner: what it does, what it's used for, and what its supported operations are. • Each algorithm is explained in this manner: what it does, how efficient it is, and its sample implementation2:34

- Arrays, Linked Lists, and SetsIntroduction to ArraysJavaScript allows us to work with simple native types, as well as complex custom objects. Arrays allow us to group related data as a single collection of elements. • Discuss supported operations (such as push, pop, find, slice, and splice) • Take a look at the JavaScript 5 Array.prototype transformation methods • Perform a hands-on exercise such as an array of authors5:28Exploring Linked ListsArrays are great for constant time indexing and data locality. However, some operations can be very slow, such as inserting an item in the middle of a list. Linked lists offer many advantages over arrays in some cases. • Discuss supported operations (such as add, delete, clear, has, front, next, and length) • Implement a linked list • Perform a hands-on exercise such as a list of articles10:19Introduction to SetsNeither lists nor arrays enforce any rules regarding duplicate items being stored in them. A set is a collection of unique objects. • Discuss supported operations (such as add, delete, clear, has, forEach, and size) • Take a look at the JavaScript 6 Set object • Perform a hands-on exercise such as article tags6:10

- Queues and StacksAll About QueuesQueues are lists that preserve the insertion order of its elements, such that the first element added is the next first to be removed (FIFO). A common use case for a queue is a task queue. Tasks to be performed are added to a queue, and then they're processed in the order they were added to the queue. • Take a look at supported operations (such as enqueue, dequeue, and length) • Implement and check the code in JavaScript • Complete a hands-on exercise, such as performing background I/O tasks4:39Exploring StacksStacks are lists that preserve the insertion order of their elements, such that the last element added is the next first to be removed (LIFO). A common use case for a stack is performing nested operations such as recursion. • Take a look at supported operations (such as push, pop, top, and length) • Implement the code in JavaScript4:20

- Trees and GraphsIntroduction to Binary TreesBinary trees are special types of trees that are most commonly used to search over a data space very quickly. Binary trees are also very fast to insert and delete, much like linked lists, but finding operations are much faster. • Discussing supported operations such as add, remove, balance • Implementation of binary trees in JavaScript • Complete a hands-on exercise such as converting an array of users to a binary tree for faster searches5:12Exploring GraphsA graph is a complex data structure that is made up of a connection of vertices connected by edges. • Walking through some fundamental operations such as addNode and AddEdge • Implementation of graphs in JavaScript • Complete a hands-on exercise such as recommendation engine7:43

- Algorithms and Complexity AnalysisDescribing Algorithms with Big-O NotationAn algorithm is a set of steps taken in order to solve a specific problem. One way to compare different algorithms in order to determine the best one needed, is to describe its complexity using Big-O. • What is an algorithm • Describing the performance of algorithms using the Big-O notation6:58Pathfinding AlgorithmsThere are two general approaches to traversing graphs, which is one powerful way to represent a map. These two approaches are depth-first and breadth-first searches. • Understanding Depth-first search • Peeking into Breadth-first search6:40

- Peeking into Algorithms to Sort and SearchSortingThis class of algorithms will describe three of the most popular sorting algorithms, namely, bubble sort, merge sort, and quicksort. • Why you should not use Bubble sort • Understanding the pros of Merge Sort • Why Quicksort is the fastest and the best9:13SearchingThis class of algorithms will describe two of the most popular searching algorithms, namely, linear search and binary search. • Learning about Linear search • Diving into Binary search7:03

- Data Structures
- JavaScript