Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Time Complexity CalculatorNew to Visual Studio Code? Get it now.
Time Complexity Calculator

Time Complexity Calculator

Sourasish Samadder

|
3 installs
| (1) | Free
Used to calculate time complexities
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Time Complexity Calculator

Time Complexity Calculator is a VS Code extension that estimates the worst-case Big O time complexity of selected code using the Gemini API.

Features

  • Analyze highlighted code from the active editor.
  • Fall back to analyzing the full file when no text is selected.
  • Show the estimated time complexity in a VS Code notification.
  • Configure the Gemini API key and model from VS Code settings.

Requirements

You need a Gemini API key from Google AI Studio.

After installing or launching the extension, add your key in VS Code settings:

timeComplexity.apiKey

Usage

  1. Open a source code file.
  2. Select the code you want to analyze, or leave nothing selected to analyze the full file.
  3. Open the Command Palette.
  4. Run Analyze Time Complexity.

The extension returns a concise Big O estimate such as O(n), O(n log n), or O(n^2).

Extension Settings

This extension contributes the following settings:

  • timeComplexity.apiKey: Gemini API key used for analysis.
  • timeComplexity.model: Gemini model used for analysis. Defaults to gemini-3.5-flash.

Known Issues

  • Results are generated by an AI model and should be treated as estimates.
  • Very large files may take longer to analyze or exceed API limits.
  • The extension requires network access to the Gemini API.

Release Notes

0.0.1

Initial release with command-based time complexity analysis.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft