
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
How to get the most out of this course
Learn to open Chrome DevTools as your code editor, dock and full screen the window, use the Sources tab and snippets, run code, and switch between dark and light modes.
Understand big O concepts, including time and space complexity. Compare code implementations by operations to judge efficiency.
Explore the first big O notation, O(n), by analyzing a simple log items function that runs a for loop n times and logs i, illustrating a proportional, linear relationship.
Learn how to drop constants in big O notation, turning O(2n) into O(n) by comparing two identical loops, and see how constants are removed for simpler analysis.
Show how nesting one for loop inside another yields O(n^2) complexity, producing n squared outputs (n times n) and, by comparison, O(n) is more efficient.
Drop non-dominant terms to simplify big O notation. A nested for loop with O(n^2) plus O(n) reduces to O(n^2).
Explore how O(1) constant time arises from a single operation, showing that even multiple additions stay constant and the graph remains a flat line.
Explore how divide and conquer on a sorted array finds a number in logarithmic time, illustrating how O(log n) outperforms linear and quadratic growth.
Learn how to express time complexity when inputs vary, using O(A) plus O(B) for separate loops and O(A*B) for nested loops, instead of assuming a single N.
Explore the big O of arrays, with push and pop as O(1), and shift, unshift, and insertions as O(n) due to reindexing; index access is O(1), value search is O(n).
Explore how big O time complexities compare, from constant time O(1) to O(n^2) and O(log n), with practical examples and the divide and conquer concept.
Explore how to define and use classes in JavaScript, including constructors, the new keyword, the this keyword, and getters and setters, with practical examples like cookies and linked lists.
Explore how pointers differ from simple variables, showing how objects share references in memory and how garbage collection clears unreachable data.
Dissect linked lists and contrast them with arrays, noting removed indexes and non-contiguous memory. See how nodes link via next pointers, with head, tail, and a null terminated end.
Explore big O for linked lists by analyzing end and beginning operations, showing constant time push and shift, while insert, remove, and find by index run in linear time.
Explore the under-the-hood structure of a linked list by examining a node as an object with a value and next pointer, and show how head and tail connect.
Build a linked list constructor by introducing a separate node class, create a new node, set head and tail to that node, and initialize length to one.
Learn to implement push in a linked list by creating a new node, updating head and tail for empty lists, linking tail.next for nonempty lists, increasing length, and returning list.
Explore the pop method for a linked list: remove the end item, move the tail to the previous node, and return the removed item, handling empty, one-item, and multi-item cases.
Implement and test a pop method for a linked list, handling empty, single, and multi-item cases, updating head, tail, and length while returning the removed node.
Implement the unshift method for a linked list by creating a new node, updating head (and tail if empty), linking to the current head for existing lists, and increasing length.
Implement the linked list shift method by removing and returning the head node, handling empty, single-item, and multi-item lists. Update head and tail correctly, break node connections, and decrement length.
Implement the get method for a linked list in JavaScript, returning the node at given index or undefined when out of bounds, by traversing from head with a temp variable.
Develop the set method for a linked list by using the get method to locate a node by index, update its value, and return true or false.
Learn to implement a linked list insert method that handles inserting at zero with unshift, at the end with push, or in the middle with get and pointer updates.
Implement a remove method for a linked list that deletes the node at a given index, using shift for zero, pop for end, undefined for invalid indices, updating length.
Learn to reverse a linked list by swapping head and tail, using a temp variable, and iterating with next and previous pointers to flip each node's link.
Use a two-pointer strategy with slow and fast pointers to locate the middle node of a linked list in one pass without knowing its length.
Explore detecting a loop in a linked list with slow and fast pointers, using cycle detection to return true when a loop exists and false otherwise.
Explore finding the kth node from end in a linked list using fast and slow pointers, since the list length is unknown, and learn to code the solution.
Demonstrates a nested-loop solution with current and runner pointers to remove duplicates in a linked list, and compares to a set-based approach (O(n)) while presenting both solutions.
Convert a binary linked list to decimal by doubling the accumulated total and adding the current node’s bit, despite not knowing the list length, illustrated with 1111 equaling 15.
Learn to partition a linked list around a pivot by building sublists for nodes less than and greater than or equal to the pivot, using dummy nodes and connecting them.
Learn to reverse the nodes between two indexes in a singly linked list using a dummy node, previous and current pointers, and a for-loop strategy.
Swap pairs in a linked list using a dummy node to swap first and second nodes, then next two, handle odd lengths, and restore the head to the dummy's next.
Create a doubly linked list constructor by adding a previous pointer to the node and initializing head, tail, and length, mirroring the singly linked list.
Push adds a node to a doubly linked list by updating tail.next and node.previous. If the list is empty, set head and tail to the node, then increase length.
Implement the pop method for a doubly linked list by moving tail via tail.previous and returning the removed node, while handling empty and single-item edge cases.
Unshift adds a new node to the head of a doubly linked list, links to the old head, updates the old head's previous pointer, and increments length.
Implement the shift method for a doubly linked list, handling zero, one, and multiple items by updating head, tail, and length, using a temp node and returning the removed node.
Get method returns the node at a specific index, handles bounds, and optimizes traversal by head-first in the first half and tail-first in the second half of doubly linked lists.
Implement the set method on a doubly linked list by retrieving the target node with get, updating its value when found, and returning true; return false for invalid indices.
Implement the insert method for a doubly linked list, inserting at an index using before and after, handling zero with unshift, out-of-range with false, and updating pointers and length.
Remove a node at a specific index in a doubly linked list, returning the removed node and updating adjacent pointers while handling zero, last item, and invalid indices.
Check if a doubly linked list of numbers is a palindrome by comparing forward and backward pointers and using the length to determine iterations for odd or even cases.
Learn to reverse a doubly linked list by iterating with current and temp, swapping next and previous pointers, and swapping head and tail to complete the reversal.
Partition a doubly linked list by placing nodes less than five before those greater or equal to five. Handle the edge case when the second list is empty.
Discover stacks in JavaScript by implementing push and pop with a linked list, using the top (left side) of the list and ensuring lifo with O(1) performance.
Construct a stack by reusing the node class from the linked list, rename the class to stack, and initialize top with a single node while setting length to one.
Implement the push method for a stack by creating a new node and making it the top. Link the previous top and update length, then return the stack.
Implement the stack pop method in JavaScript, handle empty stacks, update top to the next node, and return the popped node, demonstrated with a sample stack.
Explore queues as first in, first out with enqueue and dequeue operations, compare array and linked list implementations, and rename head and tail to first and last for the queue.
Create the queue constructor by building a node identical to a linked list node, using first and last instead of head and tail, and initializing length to one.
Implement enqueue by creating a new node, updating first and last for empty and nonempty queues, and increasing length; enqueuing seven makes last point to seven.
Implement the dq method to dequeue the first item from a queue built on a linked list, handling empty cases, updating first, last, length, and returning the removed node.
Welcome to Data Structures & Algorithms in JavaScript
This course makes learning to code fun and makes hard concepts easy to understand.
How did I do this? By using animations!
Animating the Data Structures & Algorithms makes everything more visually engaging and allows students to learn more material - in less time - with higher retention (a pretty good combination).
I will use these visuals to guide you, step-by-step, through the entire course.
The course also includes dozens-and-dozens of Coding Exercises. So you can immediately put everything into practice as soon as you learn it (a very important step).
All of this will help you to feel more confident and prepared when you walk into a coding interview.
I have made several Free Sample Videos available for the course so you can see the difference the animations make.
Also, I am very active on the Q&A, so I will be with you every_step_of _the_way.
_____________________________
What you will get in this course…
Over 100 hand-crafted animated HD videos to illustrate the Data Structures & Algorithms.
Here are the topics we will cover:
Technical
Big O notation
Data Structures
Arrays
Linked Lists
Doubly Linked Lists
Stacks & Queues
Binary Trees
Hash Tables
Graphs
Heaps
Algorithms
Dynamic Programming
Sorting
Bubble Sort
Selection Sort
Insertion Sort
Merge Sort
Quick Sort
Searching
Breadth First Search
Depth First Search
Don't just take my word for it though, check out what existing students have to say about my courses:
5-Star Review:
"In order to describe this course accurately, we need the definition of the word Beautiful. beau·ti·ful: adjective 1.- pleasing the senses or mind aesthetically. 2.- of a very high standard; excellent." - Josue Hernandez Amezcua
5-Star Review:
"The best course on DSA on Udemy" - Enlai Li
5-Star Review:
"One of the best courses on DSA. The animations do make a huge impact. All the points are explained in detail. The only problem is that I can't give it more than a 5-star rating." - Nikita Sarkar
5-Star Review:
"Amazing Course. My words cannot describe how much animations helped me to understand the concepts. 100% Recommended." - Simarjeet Singh
5-Star Review:
Being a visual learner this is BY FAR the BEST course ever. The way the instructor presents this topic makes it so easy to understand." - Eduardo SN
5-Star Review:
"The animations were really helpful for an easy understanding, but the best thing about this course for me is that it will not waste your time! It is perfectly optimized, covers the important topics that I wanted, and at the same time perfectly clear. Thank you so much." - Fatemeh Moghaddam
5-Star Review:
"This course is very well done! ... the animations in each video take the explanation and understanding of the material to a new level." - Luis Felipe Posada
5-Star Review:
"This course has seriously been amazing. The animations have worked wonders for my understanding and I have made significant progress from the beginning of the course until now." - Dakota Fabro
5-Star Review:
"I can follow as a beginner, amazing." - Sabrina Fung
5-Star Review:
"This is the best course I have ever seen" - Luong Viet Tri
REMEMBER… I'm so confident that you'll love this course that we're offering a FULL money-back guarantee for 30 days! So it's a complete no-brainer, sign up today with ZERO risk and EVERYTHING to gain.
So what are you waiting for? Click the "Buy now" button and join the best JavaScript Data Structures & Algorithms course on Udemy.
I look forward to seeing you in the course.
Now let's get started! :-)