algorithmic-complexity
/algorithmic-complexity
Reason about how running time and memory grow with input size, and know when the asymptotic answer is the wrong one. Use when choosing an approach, reviewing code that loops over data, or explaining why something slows at scale.
- Author
- Amey-Thakur ↗
- Repository
- AI-SKILLS ↗
- Licence
- MIT
- Last repository change
- 05.09.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 05.09.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Reason about how running time and memory grow with input size, and know when the asymptotic answer is the wrong one. Use when choosing an approach, reviewing code that loops over data, or explaining why something slows at scale.
Original author description
Reason about how running time and memory grow with input size, and know when the asymptotic answer is the wrong one. Use when choosing an approach, reviewing code that loops over data, or explaining why something slows at scale.
How it works
- Method
- Boundaries
SKILL.md preview
--- name: algorithmic-complexity description: Reason about how running time and memory grow with input size, and know when the asymptotic answer is the wrong one. Use when choosing an approach, reviewing code that loops over data, or explaining why something slows at scale. --- # Algorithmic complexity Complexity describes growth, not speed. An algorithm with worse asymptotics often wins on real input sizes, and one with good asymptotics can be slow because of constants and memory behaviour. Knowing both is what makes the analysis useful. ## Method 1. **Identify what grows.** Complexity is relative to a named input: number of records, size of text, number of users. Analysis without naming the variable is meaningless. 2. **Count the dominant operation.** The one inside the innermost loop or the recursive step. Everything else disappears into constants at scale. 3. **Watch for hidden loops.** A lookup inside a loop that is itself linear makes the whole thing quadratic, and library calls hide this routinely (see n-plus-one-queries). 4. **Analyse space alongside time.** An approach that is fast and holds everything in memory fails at a size the time analysis says is fine. 5. **Distinguish worst, average, and amortised.** Hash lookups are constant on average and linear in the worst case, and which one matters depends on whether an adversary chooses your input. 6. **Check the real input size before optimising.** Quadratic on twenty items is instant, and replacing it with a complex linear algorithm is a net loss (see performance-optimization). 7. **Measure to confirm.** Constants, cache behaviour, and allocation dominate at small sizes, so analysis predicts the shape and measurement gives the answer (see profiling-cpu). ## Boundaries Complexity predicts scaling, not performance; two algorithms with the same class can differ by an order of magnitude in practice. Real workloads have distributions that average-case analysis may not match. Parallelism and memory hierarchy change the picture in ways simple counting does not capture (see cpu-architecture).
Versions
The database has no other skills named algorithmic-complexity.
Database snapshot: 13.11.2026 · package version 0da90285d3b3 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100algorithmic-complexity-review
Algorithmic complexity (Big-O) review — finding nested loops, N+1 queries, exponential recursion, quadratic string builds, and other accidental complexity blowups. Covers Python, JavaScript/TypeScript, Java, Go, and similar languages. Use whenever writing, reviewing, or… - 100code-complexity-analysis
Analyzes source code to assess performance using algorithmic complexity (time and space) plus a machine-aware cost model (memory hierarchy, branches, ILP, SIMD, parallelism). Identifies bottlenecks and recommends algorithmic, data-structure, and constant-factor optimizations.… - 100dsa-time-space-complexity-big-o-analysis
Use this skill when rigorously analyzing algorithm asymptotic runtime, call stack memory, and auxiliary space for technical interviews. - 100algorithmic-intelligence
Performance engineering for code that works on data. Finds the algorithm and data structure that reach the lowest time complexity a problem allows, applies them to existing code without changing what the system does for its users (proved by differential tests and benchmarks),… - 90big-o-in-practice
Apply complexity analysis where input size actually makes it decide performance, and ignore it where constant factors dominate. Use when choosing an algorithm or data structure and you need to know whether asymptotic cost or the real constant is what bites. - 100performance-code-review-complexity-allocations
Use this skill when identify algorithmic inefficiencies, N+1 queries, and excessive allocations during review.