Algorithms Playground & Quiz

Free exploration with all data structures, plus a comprehensive quiz testing your mathematical understanding

Practice & Test Your Knowledge

You've explored algebraic structures, combinatorics, information theory, probabilistic data structures, amortized analysis, Union-Find, FFT, and advanced trees. Now it's time to experiment freely and test your understanding.

The playground lets you explore any concept without constraints. The quiz tests your mathematical understanding — not memorization of code, but comprehension of why algorithms work.

Algorithm Playground

Select any topic and explore the concepts. Reference sheets, formulas, and key insights are provided for each area. Use this as a sandbox for experimentation and review.

Monoid Explorer

Free experimentation mode. Try different inputs and observe the behavior.

Try These Monoids:

  • (ℤ, +, 0) - Addition on integers
  • (ℤ, ×, 1) - Multiplication on integers
  • (String, concat, "") - String concatenation
  • (ℤ, max, -∞) - Maximum operation
  • (ℤ, min, +∞) - Minimum operation

All segment tree operations work with ANY monoid. The structure is the same, only the operation changes!

Quick Complexity Reference

Segment Tree
O(log n) query/update
Master Theorem
Compare f(n) to nlogba
Sorting Lower Bound
Ω(n log n) comparisons
Skip List / BST
O(log n) expected
Bloom Filter
O(k) ops, O(n) bits
Union-Find
O(α(n)) ≈ O(1)
FFT
O(n log n)
van Emde Boas
O(log log U)

Knowledge Quiz

30 questions testing your understanding of the mathematical foundations of algorithms. This isn't about memorizing code — it's about understanding why these structures work and when to use them.

Question 1 of 30Score: 0 / 0
Algebraic Foundations
Which property must a monoid satisfy that a semigroup does not require?

Congratulations!

You've completed the Mathematical Data Structures & Algorithms module!

You now understand the mathematical foundations behind:

  • Algebraic structures: monoids, semigroups, segment trees
  • Combinatorics: Catalan numbers, generating functions, recurrences
  • Information theory: entropy, decision trees, lower bounds
  • Probabilistic structures: Bloom filters, skip lists, HyperLogLog
  • Amortized analysis: potential functions, accounting method
  • Union-Find: path compression, inverse Ackermann
  • FFT: roots of unity, butterfly diagrams, NTT
  • Advanced trees: B-trees, persistent trees, van Emde Boas

This knowledge will help you not just implement algorithms, but understand why they work, analyze their complexity rigorously, and design new algorithms for novel problems.

Keep exploring. Keep learning. Keep building.