The project is focused in compare the search algorithms Linear search, Binary search (iterative and recursive), Ternary search (iterative and recursive), Jump search and Fibonacci search utilizing the empirical analysis technique to determine as input size affects the performance of search algorithms.
Interface
Output file
- Review this old code
- Add sorting functions (and write a new version)
You can use the Makefile. In the root directory of the project, enter:
make
After compiling, enter:
./searching
Now, you'll need to enter the range of the array that you want to perform searches
>>> Begin: 0
>>> End: 1000000
Put the value to search
>>> Value to search: 1337
After that, we need to define the number of samples.
Assuming we want 50 samples of data, with begin = 0 and end = 1000000. We will have samples with interval of (1000000 − 0)/50 = 20000. So, the size of the samples will be like that 20000, 40000, 60000, ... , 980000, 1000000.
>>> Number of samples: 50
Finally, we will enter the search function we want to use!
>>> Available functions <<<
[1] Linear search
[2] Binary search
[3] Binary search recursive
[4] Ternary search
[5] Ternary search recursive
[6] Jump search
[7] Fibonacci search
>>> Function you want to use: 2
You are welcome! Create the pull requests.
For major changes, please, open an issue first to discuss what you would like to change.
- Twitter: @imns1ght | E-mail: jeffersonbrunoIT [at] gmail [dot] com
- E-mail RanieriSantos [at] protonmail [dot] com
Slow... The university is draining our energy. :P