Inspiration
Practicing LeetCode problems is very common among software engineers. Inspired by the potential of Google Gemini to explain complex concepts and provide personalized guidance, I built LeetCode Coach Agent to help students learn how to think like problem solvers.
What it does
- Enter a LeetCode problem to receive explanations of key concepts, common mistakes, hints, and algorithmic patterns.
- The coach is instructed not to provide code or complete solutions, encouraging users to work through problems independently.
- Save problems to a personal study history backed by MongoDB Atlas.
- Analyze previously studied problems and suggest potential strengths, weaknesses, and missing topics.
- Receive personalized suggestions for what to practice next
How I built it
Main programming language: Python
API: Google Gemini 2.5 Flash
Uses Streamlit to provide an interactive web interface where users can enter problems, view coaching feedback, track their learning, and explore recommendations. Stores saved problems and timestamps in MongoDB Atlas, allowing the application to retrieve study history for progress analysis and recommendations.
Challenges I ran into
MongoDB Atlas connectivity: I encountered connection issues caused by IP address access restrictions in MongoDB Atlas. I had to understand how Atlas network access rules work and configure access so the application could connect to the database securely.
API key and secret management: Setting up the Google Gemini API key and MongoDB connection string required learning how to manage sensitive credentials outside the source code. I worked through configuring Streamlit secrets and making sure the application could access the required credentials without hardcoding them into the repository.
Streamlit deployment and GitHub integration: Connecting our GitHub repository to Streamlit Community
Accomplishments that I'm proud of
I'm proud to have built a working AI-powered learning tool that brings together problem coaching, persistent study history, progress analysis, and next-problem recommendations in one application.
What I've learned
Through this project, I've learned how to integrate Google's Gemini API into an interactive application and use prompt engineering to shape AI responses around a specific educational goal.
What's next for LeetCode Coach Agent
- Have a separate database for each user
- Create a login system
- Improve the frontend design of the website
Log in or sign up for Devpost to join the conversation.