Think. Analyze. Optimize.
A Chrome Extension that builds the habit of analyzing Time & Space Complexity after every LeetCode submission — powered by AI.
Installation · How It Works · Features · Contributing
Most developers grind LeetCode problems, hit "Accepted," and immediately move to the next one.
But in real interviews, solving the problem is only half the answer. Interviewers always follow up with:
"What's the time complexity of your solution?" "Can you do better on space?"
ThinkInBigO bridges that gap. Every accepted submission becomes a deliberate complexity analysis exercise, with instant AI-powered feedback on whether you got it right.
Accepted Submission on LeetCode
↓
Extension detects the result (network interception + DOM fallback)
↓
Modal prompts you for TC and SC
↓
Your code + analysis → Gemini API
↓
AI evaluates correctness, confidence, and reasoning
↓
Instant feedback with explanation
↓
Result saved to your local history
Intercepts LeetCode's network responses to catch accepted submissions in real time. A DOM fallback ensures reliability even if the API response structure changes.
Sends your code and your stated TC/SC to Gemini. The model returns:
- The correct time and space complexity
- Whether your answer was right
- A concise explanation of the reasoning
- A confidence score
A clean, distraction-free popup appears after every accepted submission. No navigating away, no extra tabs — just type your answer and get feedback.
Every attempt is stored locally with:
- Problem name
- Your answer vs. the correct answer
- Timestamp
Track your progress and spot recurring blind spots over time.
Minimal design that matches LeetCode's dark theme. Built to stay out of your way until you need it.
git clone https://github.com/your-username/ThinkInBigO.git
cd ThinkInBigO- Go to
chrome://extensions/ - Toggle on Developer Mode (top right)
- Click Load unpacked
- Select the
ThinkInBigO/folder
- Visit Google AI Studio
- Generate an API key
- Open the extension popup → Settings → paste your key
You're ready. Solve a problem on LeetCode and get an accepted submission to see it in action.
ThinkInBigO/
├── manifest.json # Extension config (Manifest V3)
├── background.js # Service worker — network interception
├── content.js # LeetCode page interaction, modal injection
├── injected.js # Script injected into page context
├── popup.html # Extension popup UI
├── popup.js # Popup logic (history, settings)
├── styles.css # Modal and popup styles
└── logo.png
| Layer | Technology |
|---|---|
| Extension Architecture | Chrome Extension API · Manifest V3 |
| Core Logic | JavaScript |
| AI Evaluation | Gemini API |
| UI | HTML · CSS |
| Local Storage | chrome.storage |
User submits a Two Sum solution. Modal appears:
Your TC:
O(n)Your SC:O(1)
Gemini responds:
{
"correct_tc": "O(n)",
"correct_sc": "O(n)",
"tc_correct": true,
"sc_correct": false,
"explanation": "Time complexity is O(n) — one pass through the array. Space complexity is O(n), not O(1), because the hash map stores up to n elements in the worst case.",
"confidence": 0.97
}Feedback shown instantly inside the modal.
- Your code is sent to the Gemini API solely for complexity analysis.
- No personal data is collected or stored remotely.
- All history is stored locally via
chrome.storage— it never leaves your machine. - AI evaluation can be disabled in settings at any time.
- Analytics dashboard — visualize your accuracy trends over time
- Pattern tagging — auto-detect DP, Graph, Binary Search, etc.
- Streak system — maintain your daily analysis habit
- Weakness tracker — flag problem types where your SC/TC is consistently wrong
- Multi-LLM support — Claude, GPT-4, local models
- Firefox support
Contributions are welcome. If you find a bug, have a feature idea, or want to improve the AI prompt — open an issue or submit a PR.
- Fork the repo
- Create a branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -m 'feat: add your feature' - Push and open a PR
MIT — free to use, modify, and distribute.
Built for developers who want to interview, not just solve.
⭐ If this helps your prep, a star goes a long way.