algorithms
Master algorithm design, common patterns, optimization techniques, and problem-solving strategies. Learn to solve any computational challenge efficiently.
Best use case
algorithms is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Master algorithm design, common patterns, optimization techniques, and problem-solving strategies. Learn to solve any computational challenge efficiently.
Teams using algorithms should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/algorithms/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How algorithms Compares
| Feature / Agent | algorithms | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Master algorithm design, common patterns, optimization techniques, and problem-solving strategies. Learn to solve any computational challenge efficiently.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Algorithms Skill
## Skill Metadata
```yaml
skill_config:
version: "1.0.0"
category: problem-solving
prerequisites: [cs-foundations]
estimated_time: "8-12 weeks"
difficulty: intermediate-advanced
parameter_validation:
pattern:
type: string
enum: [search, sort, dp, greedy, backtrack, divide-conquer, graph]
required: true
language:
type: string
enum: [python, java, cpp, javascript]
default: python
retry_config:
max_attempts: 3
backoff_strategy: exponential
initial_delay_ms: 500
observability:
log_level: INFO
metrics: [pattern_usage, solution_complexity, hint_count]
```
---
## Quick Start
Become a master problem solver through systematic algorithm design.
### Common Algorithm Patterns
**Searching & Sorting (Week 1)**
- Linear search O(n)
- Binary search O(log n)
- Merge sort O(n log n)
- Quick sort O(n log n) average
- Heap sort O(n log n)
**Divide & Conquer (Week 2)**
- Split problem into subproblems
- Solve recursively
- Combine results
- Analyze with recurrence relations
**Dynamic Programming (Weeks 3-4)**
- Identify overlapping subproblems
- Define state and transitions
- Memoization vs tabulation
- Classic problems: Fibonacci, knapsack, LCS
**Greedy Algorithms (Week 5)**
- Make optimal local choice
- Examples: Huffman coding, Dijkstra, activity selection
- When to use: optimal substructure + greedy choice property
**Backtracking (Week 6)**
- Explore all solutions
- Backtrack when dead end
- Pruning branches
- N-Queens, permutations, sudoku solver
---
## Problem-Solving Framework
1. **Understand**: Read problem, identify constraints, find examples
2. **Plan**: Recognize pattern, think brute force, optimize
3. **Code**: Write clean code, handle edge cases
4. **Optimize**: Improve time/space complexity
5. **Verify**: Test, verify analysis
---
## Must-Know Problems
- **Array Problems**: Two sum, max subarray, product of array
- **String Problems**: Longest substring, pattern matching, anagrams
- **Tree Problems**: Traversal, BST, LCA, path sum
- **Graph Problems**: Shortest path, cycle detection, topological sort
- **DP Problems**: Fibonacci, knapsack, coin change, edit distance
- **Math Problems**: Prime numbers, GCD, power
---
## Troubleshooting
| Issue | Root Cause | Resolution |
|-------|------------|------------|
| TLE | Wrong complexity class | Find better algorithm |
| WA | Edge case missing | Test empty, single, max inputs |
| RE | Index out of bounds | Add bounds checking |
| Stack overflow | Deep recursion | Convert to iteration |
---
## Complexity Quick Reference
| Problem | Best | Average | Worst |
|---------|------|---------|-------|
| Merge sort | O(n log n) | O(n log n) | O(n log n) |
| Quick sort | O(n log n) | O(n log n) | O(n²) |
| Binary search | O(1) | O(log n) | O(log n) |
| Linear search | O(1) | O(n/2) | O(n) |
---
## Interview Tips
- Communicate your approach
- Discuss time/space trade-offs
- Code cleanly on the first try
- Test with examples
- Optimize if time permitsRelated Skills
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
vercel-deploy
Deploy applications and websites to Vercel. Use this skill when the user requests deployment actions such as "Deploy my app", "Deploy this to production", "Create a preview deployment", "Deploy and give me the link", or "Push this live". No authentication required - returns preview URL and claimable deployment link.
vercel-deploy-claimable
Deploy applications and websites to Vercel. Use this skill when the user requests deployment actions such as 'Deploy my app', 'Deploy this to production', 'Create a preview deployment', 'Deploy and...
vercel-composition-patterns
React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.
vercel-ai-sdk-development
Use when building AI-powered applications with the Vercel AI SDK (V6+). Covers agents (ToolLoopAgent), tool design with execution approval and strict mode, MCP client integration, structured output with tool calling, streaming patterns, DevTools debugging, reranking, provider-specific tools, and UI integration with React/Next.js.
vercel-ai-sdk-best-practices
Best practices for using the Vercel AI SDK in Next.js 15 applications with React Server Components and streaming capabilities.
venice-router
Supreme model router for Venice.ai — the privacy-first, uncensored AI platform. Automatically classifies query complexity and routes to the cheapest adequate model. Supports web search, uncensored mode, private-only mode (zero data retention), conversation-aware routing, cost budgets, function calling, thinking/reasoning mode, and 35+ Venice.ai text models. Use when the user wants to chat via Venice.ai, send prompts through Venice, or needs smart model selection to minimize API costs while keeping data private from Big Tech.
validator-workflow
Phase-level validation workflow for validator agents. Handles loading project rules, reading phase files, running /code-review, conditional verification (unit tests + typecheck + E2E/DB tests based on phase type), determining verdict, and reporting to the orchestrator. Invoke this skill as your first action — not user-invocable.
V3 Core Implementation
Core module implementation for claude-flow v3. Implements DDD domains, clean architecture patterns, dependency injection, and modular TypeScript codebase with comprehensive testing.
uvicorn
ASGI server for Python web applications - Fast, production-ready server for async frameworks
using-superantigravity
Use when starting any conversation — establishes how to find and use skills, requiring skill check before ANY response including clarifying questions
using-neon
Guides and best practices for working with Neon Serverless Postgres. Covers getting started, local development with Neon, choosing a connection method, Neon features, authentication (@neondatabase/...