
Already know some of this? A 2-minute test skips the lessons you know.
Take the placement testA free 26-lesson course built from Multi Atoms Plus's 3h 03m of YouTube video. 2 days at 90 minutes a day, with study notes and a quiz in every lesson. A 2-minute placement test skips what you already know.
Taught by Multi Atoms Plus on YouTube. Videos play in YouTube's own player, so the creator keeps every view.
Explain why algorithm analysis is needed to choose the most efficient algorithm and distinguish between time complexity (execution time) and space complexity (memory usage).
Explain Omega (lower bound/best-case), Theta (tight bound/average-case), Little-o (strict upper bound), and Little-omega (strict lower bound) with diagrams and examples.
Apply the substitution method to solve T(n) = 2T(n/2) + n by repeatedly expanding until the base case is reached, deriving the complexity Θ(n log n).
Use the iteration method (repeated substitution) to solve T(n) = T(n-1) + 1 with base case T(1)=1, expanding the recurrence to find the pattern and complexity.
Visualize the recursion tree for T(n) = 2T(n/2) + n, calculate cost per level, determine tree height (log n), and sum costs to derive Θ(n log n) complexity.
Apply the Master Theorem to T(n) = 4T(n/2) + n² by identifying a=4, b=2, k=2, p=0, checking Case 2, and deriving the solution Θ(n² log n).
Trace Bubble Sort on an example array (15, 16, 8, 5), showing how adjacent elements are compared and swapped per pass to bubble the largest element to the end.
Write the pseudocode for Bubble Sort using nested loops (passes and comparisons) and derive its time complexity as O(n²) for worst, average, and best cases.
Trace Insertion Sort on an example array, showing how elements are picked and inserted into the sorted left portion by shifting larger elements right.
Trace Selection Sort by finding the minimum element in the unsorted portion and swapping it with the first unsorted element, repeating until sorted.
Explain Shell Sort using gap sequence (n/2, n/4, ..., 1), dividing array into subarrays, applying Insertion Sort on each gap, and reducing gap until 1.
Define Max Heap property (parent >= children) and demonstrate building a Max Heap from an array by inserting elements level-by-level and heapifying up.
Perform the Heap Sort sorting phase: repeatedly swap root with last element, reduce heap size, heapify root, and delete sorted elements to build the final sorted array in-place.
Explain Merge Sort's divide-and-conquer approach: recursively split array until single elements, then merge sorted halves back together using the merge procedure.
Trace the Merge Sort partition logic on an example array (23, 11, 5, 15, 68, 31, 4, 17), calculating mid indices and splitting until single elements remain.
Detail the merge algorithm (comparing two sorted halves into a temp array) and derive time complexity O(n log n) using Master Theorem (a=2, b=2, f(n)=n).
Explain Quick Sort partition logic: select pivot (first element), use indices i and j to scan and swap elements smaller than pivot to left, finally place pivot at correct index m.
Trace Quick Sort on array (5, 10, 3, 6, 9, 2, 11, 14) showing partition steps, pivot placement, and recursive calls on left (p to m-1) and right (m+1 to q) subarrays.
Trace Radix Sort on decimal numbers: pad to equal digits, stable sort by unit digit (using buckets 0-9), then tens digit, then hundreds digit to achieve final sorted order.
Explain Bucket Sort (distribute uniform [0,1) inputs into buckets, sort each, concatenate) and Counting Sort (count frequencies, prefix sum for positions, place elements in output array).
Trace Counting Sort on a given array: find range (0 to k), create count array, scan input to populate counts, compute prefix sums for positions, and build sorted output array backwards for stability.
Derive lower bound (Ω), upper bound (O), and tight bound (Θ) for f(n) = 3n+2 by finding constants c, c1, c2 and n0 satisfying the formal definitions.