10/12/2020
Jordan Bui (BroncoID: 011821368)
CPP Fall 2020
CS 3310 Design and Analysis of Algorithms
Implements two different methods for finding a given sum between 2 numbers in a given array and returns the sum and the 2 numbers.
This program tests the Brute Force Method and the Hash Map method for bot sorted and unsorted random arrays.
Both are tested using a randomly generated sum and randomly generated arrays.
Given an array on numbers and a desired sum, this program searches the given array for any 2 numbers that add up to the given sum and displays the 2 numbers as well as the sum.
- Tests Brute force for sorted and unsorted random arrays.
- Tests Hash Map method for sorted and unsorted random arrays. (Same algorithm used for sorted and unsorted arrays)
- Displays Run Times for each method tested on both sorted and unsorted arrays for all array sizes.
- Comb Sort is used to sort the array but not accounted in the run times.