Logo AnimGAnimG

Big-O Complexity

Descripción

Plots growth curves for the six major Big-O complexity classes on a shared set of axes. A ValueTracker animates n growing, showing how quickly each curve diverges. A reference table maps each complexity to example algorithms.

Big-O Complexity

Description

Plots growth curves for the six major Big-O complexity classes on a shared set of axes. A ValueTracker animates n growing, showing how quickly each curve diverges. A reference table maps each complexity to example algorithms.


Phases

# Phase Name Duration Description
1 Title Card 3s Title fades in
2 Axes Setup 3s Labeled axes appear
3 Draw Curves 14s Each curve drawn sequentially with label, distinct color
4 ValueTracker 8s Vertical line sweeps right; dots on each curve highlight
5 Algorithm Table 8s Table: complexity → example algorithms
6 Outro 3s Fade out

Layout

+------------------------------------------------------+
|              Big-O Complexity                       |
+------------------------------------------------------+
|                                                      |
|  y = runtime   ^                                     |
|                |  O(2^n) ↗                          |
|                |    O(n²) ↗                         |
|                | O(n log n) ↗                        |
|                |     O(n)  /                         |
|                |  O(log n)~                          |
|                |___O(1)______________                |
|                +-----------------------> n           |
|                                                      |
|  Complexity   | Example Algorithm                   |
|  O(1)         | Array index lookup                  |
|  O(log n)     | Binary Search                       |
|  O(n)         | Linear Search                       |
|  O(n log n)   | Merge Sort                          |
|  O(n²)        | Bubble Sort                         |
|  O(2^n)       | Brute-force Subsets                 |
+------------------------------------------------------+

Area Descriptions

  • Top: Title
  • Main area: Manim Axes with 6 colored curves
  • Bottom: Algorithm reference table

Assets & Dependencies

  • Fonts: LaTeX / sans-serif
  • Manim version: ManimCE 0.19.1

Notes

  • x range 0–8, y range 0–12 (clipped) to keep curves visible
  • Colors: O(1)=white, O(log n)=cyan, O(n)=neon green, O(n log n)=yellow, O(n²)=orange, O(2^n)=red
  • ValueTracker vertical dashed line sweeps from x=1 to x=6
  • Table appears on right side after curves are drawn
Audiencia: High SchoolCategoría: Cs
Big-O Complexity for High School in Cs | AnimG Library