Skip to content

ajpert/Max-subarray

Repository files navigation

Max-subarray

4 different functions with decreasing run time to find the Max subarray
needs to be compiled with c++ 11 (g++ -std=c++11 your_file.cpp -o your_program)
please enter certain file of numbers in the list of given text files in the command line when running such as ./run num_array_500.txt
you can have your own input if you make your own file, but follow the format of the other files
The different sorting functions are:

  1. enumeration (O = n^3)
  2. itteration (O = N^2)
  3. simplification_deligation (O = Nlog(n))
  4. recursion inversion (O = N)

This program outputs the time that each takes to run, and the largest sub array added up.

About

4 different functions with decreasing run time to find the Max subarray (CS 325 2021)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages