
Explore fundamental data structures in JavaScript, including arrays, linked lists, trees, stacks, queues, graphs, and hash maps, and learn recursion and Big O time and space.
Explore the difference between arrays and lists in JavaScript, noting fixed-size arrays and lists, and show how a list is built from a fixed-size array using get and add methods.
Explore fixed size, zero based arrays and for loops to iterate data, compute averages, and track minimum and maximum temperatures by sampling the first element.
Write a JavaScript function that takes an array and returns the sum of absolute differences between consecutive elements, handling empty and single-element cases. Ensure loop bounds to avoid undefined values.
Implement a contains function using the mousetraps technique to search an array, returning true when found and handling empty array; implement is sorted with pairwise comparisons to verify ascending order.
Explore two-dimensional array traversal by finding the largest product of adjacent numbers (left, right, up, down; no diagonals) in a 4x4 grid, with boundary checks and a get cell helper.
Learn to implement tally sort in JavaScript by counting occurrences of integers within a min-max range and reconstructing a sorted array.
Learn how to remove an element from an array by shifting items left from the index and decrementing size, using a loop that overwrites positions and scribbles out stale values.
Implement a JavaScript list contains method using a for loop with i from zero to size, returning true when data at i equals value, otherwise returning false after examining array.
See how the list class exposes get and set methods to safely access data. The methods enforce index bounds, returning the value or null and preventing out-of-range edits.
This lecture uses a measure time utility to compare functions across array sizes, illustrating constant time for size queries, linear time for removal, and n squared time for contains duplicates.
Explain how a tally sort algorithm counts occurrences, builds a new array from those counts, and reduces time complexity to O(n) by dropping constants.
Build and manipulate linked lists in JavaScript by creating nodes, linking them with next pointers, and inserting at the front or end, removing middle elements in O(1).
Compare array lists and linked lists, showing array lists store data contiguously for read and write, while linked lists allow inserts and removals with O(1) updates and avoid O(n) shifts.
Iterate each character, push opening parentheses on a stack, and pop on a matching closing parenthesis; return false if unmatched, and ensure the stack is empty at the end.
This lecture demonstrates condense using two stacks to remove matching pairs from a sequence, achieving an efficient O(n) solution with push and pop, and contrasts it with an O(n^2) approach.
Explore the queue data structure, a first in, first out system with enqueue and dequeue operations, implemented via a linked list with front and tail for constant time.
Explore the Josephus problem with a queue-based approach by simulating an array of people in a circle, counting to n, and eliminating every nth choice until one winner remains.
Apply the sieve of Eratosthenes with two queues to generate primes up to n, swapping queues and filtering numbers by divisibility to build the primes list.
Explore trees as a recursive, branching data structure with a root, left and right nodes. Compare to linked lists, learn iterating trees, and study binary trees and their advantages.
Practice recursively traversing a tree to sum all node data values using a public-private function pair, without converting to arrays, and returning zero when the tree is empty.
Implement a binary tree contains function that traverses left and right, returns true when a node matches the value, or false if null; illustrated with 44 found, 100 not found.
Explore binary search trees, where left values are smaller and right values are larger; implement insert and contains and grasp why search runs in O(log n).
Build a MorseCodeTree class in JavaScript with a manual constructor and decode method to convert sequences of dots and dashes into letters like sos and cat.
Explore hash maps, hash tables, and dictionaries, linking keys to values with a hash function that computes an index in buckets for constant average time. Understand collisions and handling ideas.
Master collision handling in JavaScript by implementing a hash map with buckets and a linked list, including insertion, retrieval, and the impact of load factor and hash functions.
If you want to be a good programmer or want to build good software, then the knowledge of data structures and their role in software development becomes essential. Data Structure is basically a process for collecting and organizing the data in the best way possible for performing operations efficiently. They form the fundamentals of computer science. With a good understanding of data structure, we master the way of organizing and storing data for a specific purpose. This course is aimed for helping you understand the core concepts behind these data structures and how they are used to build algorithms that solve business problems.
Why this course is important?
This course gives insight into the data science and algorithms in JavaScript covering all the essential topics. It unfolds with the basic introduction, then covers all the aspects of arrays such as arrays vs lists, common array iterations, array functions and others. Following this, lists, big o time space asymptomatic analysis, linked lists and stacks are also covered in details. Lastly, introduction to queues, its implementation, various aspects of recursion, trees, hash maps and graphs are also covered for the complete understanding of data science and algorithms.
This course includes-
1. Introduction to the data structure
2. Arrays, common array comparisons, array functions, searching arrays, 2d arrays, iterating over 2d arrays, Minesweeper challenge, minesweeper solution and others
3. Lists, implementing list push, implementing list remove and so on
4. Big o time space asymptomatic analysis- its introduction, big o of n squared, no constants, big o challenge and big o solution
5. Linked lists, coding linked lists, linked list class, remove at index and add at index
6. Stacks- introduction, implementation, stack out of linked list, stack out of array, condense challenge and others
7. Queues, recursion, trees, hash maps, graphs and much more important things!
Get started with this course now to learn data structures and algorithms for acing any job interview or building better software!