An open API service indexing awesome lists of open source software.

https://github.com/abhinav2712/timecomplexitycalculator

Time Complexity Calculator: Estimate the time complexity of your program using Big O notation.
https://github.com/abhinav2712/timecomplexitycalculator

app big-o-notation performance react react-app time time-complexity-analysis typescript web

Last synced: 19 days ago
JSON representation

Time Complexity Calculator: Estimate the time complexity of your program using Big O notation.

Awesome Lists containing this project

README

        

# Time Complexity Calculator

The Time Complexity Calculator is a web application built with React that estimates the time complexity of a program in Big O notation.

## Description

The Time Complexity Calculator allows you to input a program and analyzes its structure to estimate its time complexity. By counting the number of loop keywords (`for`, `while`, `do`), the app determines the maximum loop depth and provides an estimate of the time complexity as `O(n^maxLoopDepth)`.

## Features

- Input a program and calculate its time complexity
- Estimate time complexity based on loop depth
- Display time complexity in Big O notation

## Installation

1. Clone the repository:

```shell
git clone
```

2. Navigate to the project directory:
```shell
cd time-complexity-app
```
3. Install the dependencies:
```shell
npm install
```
## Usage
1) Start the development server:
```shell
npm start
```
2 )Open your browser and visit http://localhost:3000 to access the Time Complexity Calculator.

3) Enter your program in the provided textarea.

4) Click the "Calculate Time Complexity" button to estimate the time complexity.

## Example
Here's an example program to calculate the factorial of a number:
![image](https://github.com/abhinav2712/TimeComplexityCalculator/assets/68495520/7be84fa7-f534-414b-9b2e-4c63b6d9b273)

Entering this program in the app will estimate the time complexity as O(n).

## Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to submit a pull request.