DEV Community

Cover image for Leetcode and SystemDesign Mentor Agent
Dmitry
Dmitry

Posted on

Leetcode and SystemDesign Mentor Agent

This is a submission for the Runner H "AI Agent Prompting" Challenge

What I Built

I built an autonomous Algorithm and System Design Mentor Agent—a specialized AI workflow that simulates the experience of working with a senior software engineer or FAANG interviewer on LeetCode and system design problems. This Runner H-powered agent provides structured, interactive, and expert-level feedback loops for anyone preparing for technical interviews or seeking to master advanced problem-solving.

Instead of static explanations or one-off code reviews, my workflow enables continuous, context-aware mentorship: parsing new problems, evaluating user approaches, offering strategic hints, analyzing complexity, and simulating real interview feedback—all in a proactive, looped dialogue

Demo

Demo with LeetCode task

Demo Run

Sample Workflow Output:

  • Structured problem outline (type, constraints, complexity targets, edge cases)
  • Step-by-step evaluation of user’s solution strategy
  • Strategic hints for optimization—without spoilers
  • Complexity breakdown and edge case analysis
  • Interview-style feedback and follow-up questions
  • Study document creation and iterative refinement options

How I Used Runner H

I used Runner H’s multi-step automation and conversational memory to create an interactive technical mentor that operates in a continuous feedback loop. The workflow is driven by a master prompt:

You are my autonomous Algorithm and System Design Mentor Agent. Your role: software engineer working on LeetCode problems and system design challenges. I need expert-level feedback on my approaches.

**Initial Setup:**
When I provide a problem description, first parse it completely and extract:
- Problem type (algorithm, data structure, system design)
- Key constraints and requirements
- Expected complexity targets
- Edge cases to consider

Present this analysis to me as a structured outline.

**Then, wait for me to select one of the following actions:**
1. Evaluate My Approach
2. Hint Me Toward Optimization
3. Analyze Complexity
4. Check Edge Cases
5. Interview Simulation
6. Alternative Approaches

**For each response, I'll provide:**
- My current approach and pseudocode
- Specific areas where I need guidance

**After each analysis, offer these options:**
• "Refine this feedback"
• "Create a study document of this solution approach"
• "Simulate follow-up interview questions"
• "Choose another action from the list"

**Output Format:**
Always structure responses with:
- ✅ Assessment: Is the approach correct/optimal?
- 🎯 Strategic Hints: High-level guidance (no code)
- ⚠️ Considerations: Edge cases or potential issues
- 📊 Complexity Notes: Time/space analysis

Keep looping—never stop asking for the next input until I say "exit" or "done".

Always be proactive: after each response, ask: "Would you like to refine, create study materials, simulate more questions, or exit?"

Enter fullscreen mode Exit fullscreen mode

Use Case & Impact

Who Benefits:

  1. Interview Candidates: Simulate real technical interviews with iterative, actionable feedback.
  2. Software Engineers: Sharpen problem-solving and system design skills with expert guidance.
  3. Educators & Bootcamps: Provide automated mentorship and study materials for learners.
  4. Teams: Foster peer review and learning in a structured, repeatable format.

Process Transformation:

  • From One-Off Feedback to Continuous Mentorship: The agent never stops prompting for next steps, ensuring ongoing engagement and deeper learning.
  • From Static Explanations to Proactive Guidance: Each response is tailored to the user’s current approach and needs, with options to refine, document, or simulate interviews.

Measurable Impact:

  1. Faster mastery of complex algorithms and system design patterns
  2. Improved interview readiness and confidence
  3. Creation of personalized study documents and interview question banks
  4. Consistent, unbiased, and expert-level feedback—on demand

Strategic Advantages:

  • Structured, Looping Workflow: Keeps users engaged and progressing until mastery
  • Expert-Level Analysis: Simulates feedback from senior engineers and interviewers
  • Flexible Output: Study docs, interview simulations, and alternative strategies—all in one workflow

Top comments (0)