diff --git a/Algorithms.h b/Algorithms.h index 73e728f..f8de29c 100644 --- a/Algorithms.h +++ b/Algorithms.h @@ -120,7 +120,7 @@ struct DynamicInt64Array getPrimes(int64_t goalNumber){ } } - quickSortDynamicInt64Array(&primes); + bubbleSortDynamicInt64Array(&primes); return primes; } @@ -162,7 +162,7 @@ struct DynamicInt64Array getNumPrimes(int64_t numberOfPrimes){ } //The numbers should be in order, but sort them anyway just in case - quickSortDynamicInt64Array(&primes); + bubbleSortDynamicInt64Array(&primes); return primes; } @@ -183,7 +183,6 @@ struct DynamicInt64Array getFactors(int64_t goalNumber){ ++cnt; } } - //If it didn't find any factors in the primes the number itself must be prime if(factors.size == 0){ pushBackDynamicInt64Array(&factors, goalNumber); @@ -227,7 +226,7 @@ struct DynamicInt64Array getDivisors(int64_t num){ } } //Sort the vector for neatness - quickSortDynamicInt64Array(&divisors); + bubbleSortDynamicInt64Array(&divisors); //Return the vector of divisors return divisors;