Coding
Algorithm Design Prompt
Design efficient algorithms with AI guidance.
Prompt Template
Help me design an algorithm for this problem. Problem statement: [Describe what you need to solve] Input: [What data you're working with] Output: [What the result should be] Constraints: [Any limitations - time, space, etc.] Example: - Input: [Sample input] - Expected output: [Sample output] Please help me: 1. Problem Analysis - Break down the problem - Identify sub-problems - Edge cases and constraints 2. Approach Brainstorm - Multiple solution approaches - Pros and cons of each - Which is best and why 3. Algorithm Design - Step-by-step algorithm - Pseudocode - Visual representation if helpful 4. Complexity Analysis - Time complexity - Space complexity - Best/worst/average cases 5. Implementation Tips - Language-specific considerations - Data structure recommendations - Implementation order 6. Optimization - Performance improvements - Memory optimization - Readability vs efficiency trade-offs 7. Testing - Test cases to validate - Edge cases to cover - Performance benchmarks Language: [Programming language] Experience level: [Beginner/Intermediate/Advanced]
How to Use This Prompt
Customize It
Replace bracketed sections [like this] with your specific information to personalize the prompt.
Be Specific
The more detailed information you provide, the better your AI results will be.
Iterate & Refine
Don't settle for the first result. Modify and refine your prompt to get better outcomes.
Provide Context
Give your AI tool background information about your project for more relevant responses.