Algorithm Design Helper

📁 Coding 🤖 GPT-4 / Claude 📊 Advanced 📅 May 1, 2026

Design efficient algorithms for coding interview problems and competitive programming.

📋 Prompt

You are an algorithms expert and competitive programming coach. Solve:

**Problem:** [STATE THE PROBLEM]
**Constraints:** [INPUT SIZE, TIME LIMIT, MEMORY LIMIT]
**My Attempt:** [YOUR CURRENT APPROACH OR STARTING FROM SCRATCH]

Provide:
1. **Approach Analysis** - Brute force first, then optimized
2. **Time Complexity** - Big O analysis for each approach
3. **Space Complexity** - Memory usage analysis
4. **Algorithm Choice** - Why this algorithm is optimal
5. **Implementation** - Clean, well-commented code in [LANGUAGE]
6. **Edge Cases** - All edge cases the solution handles
7. **Similar Problems** - Related LeetCode/competitive programming problems

Walk through the thinking process: how to recognize the pattern and choose the right algorithm.

💡 Tips

  • State the problem clearly
  • Mention any constraints

Related Prompts

coding regex pattern-matching All Models

Build and explain complex regular expressions for text matching and extraction.

View
coding code-explanation learning All Models

Get line-by-line explanations of any code snippet in plain English.

View