Removed unnecessary headers

This commit is contained in:
2020-08-28 14:26:09 -04:00
parent a797bb6718
commit 3757e2169c
27 changed files with 15 additions and 31 deletions

View File

@@ -40,8 +40,7 @@ private:
uint64_t letterCount; //This is the cumulative number of letters in the words of the numbers
//Functions
std::string makeWord(int num); //This function makes a word out of the number passed into it
std::string wordHelper(int num); //This function helps makeWord() by returning the words for the numbers 1-9
std::string makeWordFromNum(int number); //This function makes a word out of the number passed into it
uint64_t countLetters(std::string str); //This counts the number of letters in the string that is passed in (ignoring numbers and punctuation)
public:
//Constructor

View File

@@ -67,7 +67,7 @@ public:
};
/* Results
There are 171 Sundays that landed on the first of the months from 1901 to 2000
It took an average of 4.749 milliseconds to run this problem over 100 iterations
It took an average of 1.400 milliseconds to run this problem over 100 iterations
*/
#endif //PROBLEM19_HPP

View File

@@ -39,6 +39,7 @@ private:
//Instance variables
std::vector<uint64_t> sums; //Holds the score based on the sum of the characters in the name
std::vector<uint64_t> prod; //Holds the score based on the sum of the characters and the location in alphabetical order
uint64_t sum; //Holds the sum of the scores
//Functions
void reserveVectors(); //Reserve the size of the vector to speed up insertion

View File

@@ -33,6 +33,8 @@
class Problem9 : public Problem{
private:
//Variables
//Static variables
static int GOAL_SUM; //a + b + c should equal this number
//Instance variables
int a; //Holds the size of the first side
int b; //Holds the size of the second side