VS Code Extensions
T

Time Complexity Calculator

by sourasishsamadder

Used to calculate time complexities

Downloads

18

Rating

5.0 / 5 (1)

Version

0.0.1

Last updated

Jul 15, 2026

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.

Related extensions