Install any skill in seconds. Free to start, no credit card required.
Get Started Free →brycewang-stanford/algorithms-complexity-guide
Analyze algorithm complexity and computational efficiency for research
Passed 15 of 23 test cases with the skill, and 12 of 23 without it.
and 1 more in the full report
3 fixed12 passed either way8 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
Provide a minimal LaTeX skeleton for typesetting a new sorting algorithm. It needs an input specification and an output specification.
| Checked | Without skill | With skill |
|---|---|---|
| uses the KwIn macro for input specification | Missed | Passed |
| uses the KwOut macro for output specification | Missed | Passed |
The instructions your model reads when the skill loads.
A skill for analyzing algorithm complexity and computational efficiency in research contexts. Covers asymptotic notation, common complexity classes, NP-completeness, amortized analysis, and strategies for presenting algorithmic contributions in papers.
O(f(n)) -- Upper bound (worst case, "at most")
T(n) is O(f(n)) if T(n) <= c * f(n) for large n
Omega(f(n)) -- Lower bound (best case, "at least")
T(n) is Omega(f(n)) if T(n) >= c * f(n) for large n
Theta(f(n)) -- Tight bound (exact asymptotic growth)
Both O(f(n)) and Omega(f(n))
Common growth rates (slowest to fastest):
O(1) < O(log n) < O(sqrt(n)) < O(n) < O(n log n) < O(n^2) < O(n^3) < O(2^n) < O(n!)
def estimate_runtime(n: int, complexity: str) -> dict:
"""
Estimate practical runtime for common complexities.
Args:
n: Input size
complexity: Complexity class string
"""
import math
complexities = {
"O(1)": 1,
"O(log n)": math.log2(max(n, 1)),
"O(n)": n,
"O(n log n)": n * math.log2(max(n, 1)),
test cases passed, vs 12 / 23 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.