
After this lesson, you will develop a vey clear understanding of bit and byte, including what they are and what they can store.
Learn how bits become bytes and map to characters through ascii's 7-bit 128-character set, unicode, and utf-8/utf-16, with historical Chinese encoding efforts.
Explain how bit width governs memory addressing, from binary digits to hexadecimal notation, and compare 32-bit and 64-bit limits on addressable memory and memory space.
Explore non-linear data structures, including binary trees, heaps, and BSTs, learning how root, leaves, depth, height, and complete versus full trees shape storage.
Explore how a binary min-heap is realized in JavaScript by inserting a new element and percolating it up using the parent index formula, floor((childIndex - 1) / 2), so the root remains the smallest.
In JavaScript, convert an ascending array into a binary max heap by building a max heap, pushing elements, and sifting up with parent swaps, enabling the heap sort algorithm.
Explore how binary heaps enable heap sort, using a max heap for descending order and a min heap for ascending order with O(log n) time and O(1) space.
Identify the most and least frequent words in a string by iterating over a word-count object, tracking max and min values, and collecting all words with those frequencies into lists.
Learn bubble sorting by moving largest element to the end of an array, performing swaps, and counting comparisons. Discover how this method sorts data in ascending and descending with JavaScript.
Demonstrates bubble sort in JavaScript by comparing neighboring elements, swapping when needed, and using the length property in a for loop to move the largest or smallest to the end.
Learn how to move the smallest element to the beginning by iterating the array backwards, swapping the current element with the previous one, and adjusting the loop initialization and condition.
Improve program efficiency by ending the outer loop early when no elements move, using a sorted flag to halt loops while converting ascending to descending.
Use the right sorting border to stop the inner loop early, tracking the last exchange index to update the right sorting border and avoid unnecessary comparisons.
Iterate the array backwards to build the sorted section at the start, using a left sort border to avoid unnecessary comparisons and sort in descending order.
Explore how the quick sort algorithm uses a random pivot and partitioning to divide an array into left and right sections, applying divide-and-conquer to reach a sorted result.
Explore how quick sort uses recursion in JavaScript, defining a quickSort function, selecting a middle pivot, and partitioning into left and right sections, with a review of concatenate and slice.
Learn how to handle duplicated elements by using a Q array to count index usage, check for undefined values, and build ascending and descending arrays.
Improve efficiency in counting sort by narrowing the range to the unsorted array's minimum and maximum, and iterating only over the effective range to sort in ascending or descending order.
Improve program efficiency by shrinking the Q array to the effective range, subtracting the minimum value to offset indices with a proxy element, and restoring original values after sorting.
Learn insertion sort, a simple sorting algorithm that builds a sorted left section by inserting each new element into its correct place, with a seven-element array and JavaScript demonstration.
Demonstrate insertion sort by implementing an insert sort function, iterating through an array with outer and inner loops to swap elements until the sorted section is ascending and return array.
Demonstrate bucket sort in JavaScript by finding max and min, creating six buckets, populating them with elements, and concatenating buckets into a sorted ascending array.
This is a data structure and algorithm crash course for JavaScript developers.
You will learn linear and non-linear data structures and eight sorting algorithms. You will also learn the big O notation so that you can pick the best algorithm for your program.
At the beginning of this course, you will learn basic computing knowledge like bit, byte, memory address, byte addressing, etc.