Skip to content

Program that can write the time complexity of a C/C++ code and the blocks that formed it

Notifications You must be signed in to change notification settings

DdimaPos/Time-Complexity-Analizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Individual Work for DSA course

The purpose of this project is to provide a utility to analyse the Time Complexity of an algorithm written in C++

How to use

  1. Compile and run main_code.cpp
  2. Choose what input to provide (code in file or input from keyboard)

Keyboard input

Introduce the code line by line. If you type 2 newlines in row, programm will treat it as EOF.

File input

Write the path to file with the code to be analysed

Output

Shows the time complexity in the following form

O(n^x log^y(n))

*Loops that have built this complexty*

Screenshot

Screenshot of output

Functionalities and limitations

  • Analyse for loops and function calls
  • Doesn't handle recursive functions and while loops
  • Basic error handling to show the problematic loop declaration

About

Program that can write the time complexity of a C/C++ code and the blocks that formed it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published