Algo Mentor AI is a professional-grade VS Code extension designed to act as your strict Data Structures and Algorithms (DSA) mentor. It analyzes your C++ code directly within your editor and provides instant, line-specific feedback on time complexity, space complexity, and logical flaws using Google's Gemini AI.
Features
-
Line-Aware Complexity Analysis: Get instant Big-O notation for your highlighted code or entire files.
-
Proactive Bug Detection: Identifies logical flaws, runtime errors, and edge-case behaviors with precise line-number mapping.
-
Senior-Engineer Optimization Hints: Receives actionable, professional-grade advice to optimize your algorithms.
-
Native IDE Integration: Results are presented in a sleek, theme-aware Webview panel.
Setup & Configuration (Important)
To ensure privacy and security, this extension uses your own API key.
-
Install the extension from the VS Code Marketplace.
-
Open your VS Code Settings (Ctrl + , or Cmd + ,).
-
Search for "Algo Mentor".
-
Paste your Google Gemini API Key into the Algo Mentor: Api Key field.
- Don't have a key? Get one for free at Google AI Studio.
How to Use
-
Open any C++ file in VS Code.
-
Highlight a specific function or block of code, OR leave your selection empty to audit the entire file.
-
Open the Command Palette (Ctrl + Shift + P or Cmd + Shift + P).
-
Type "Algo Mentor: Analyze Code" and press Enter.
-
The analysis report will appear in a panel to the right.
Engineering Standards
This extension is built using:
-
VS Code Extension API (Commands, Webviews, Configuration)
-
Google Gemini API (1.5-Flash for low-latency analysis)
-
Secure Auth Architecture (No hardcoded credentials; user-configured settings)
-
Automated Data Processing (Line-mapped code pre-processing for high AI accuracy)
Built with passion for the developer community. If you find this tool helpful, feel free to contribute or report issues on the GitHub repository.