/Algorithm_Comparer

Given two c++ programs, it compares the time taken to execute for various inut

Primary LanguageJupyter Notebook

Algorithm Comparer

This program is meant to plot size of input VS time taken for two different algorithms, hence enabling you to compare the time complexity of the algorithms without ignoring the constants which sometimes can alter the effeciency :p

To run it

  • Make sure you have downloaded the dependencies mentioned in requirements.txt
  • Write the first algorithm in algorithm1.cpp , and second one in algorithm2.cpp
  • Prepare the input in compare.cpp, it is ensured that both files get the same input
  • Run the jupyter notebook and see the graph :))
  • Note that for any n you choose, total time complexity will be O(n*O(algorithm))

Note

  • I have used this to just compare a Recursive Merge sort algorithm to a 3 way recursive merge sort algorithm for n = 5