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.
- Host: GitHub
- URL: https://github.com/abhinav2712/timecomplexitycalculator
- Owner: abhinav2712
- Created: 2023-06-07T08:35:07.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-06-07T08:58:54.000Z (about 2 years ago)
- Last Synced: 2025-04-12T13:15:49.237Z (3 months ago)
- Topics: app, big-o-notation, performance, react, react-app, time, time-complexity-analysis, typescript, web
- Language: TypeScript
- Homepage:
- Size: 173 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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:
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.