Updated various typoes and removed some unneeded code

This commit is contained in:
2020-07-11 13:35:37 -04:00
parent c72754dcf8
commit 0caa043b59
17 changed files with 31 additions and 33 deletions

View File

@@ -37,14 +37,11 @@ protected:
public:
//Constructors
Problem() : solved(false){
}
Problem(std::string description) : description(description), solved(false){
}
//Destructor
virtual ~Problem(){
}
//Gets
virtual std::string getDescription() const{

View File

@@ -38,7 +38,6 @@ private:
static uint64_t MAX_NUMBER; //The highest number to be tested
//Instance variables
uint64_t fullSum; //For the sum of all the numbers
std::vector<uint64_t> numbers; //Holds all the numbers
public:
//Constructor
Problem1();

View File

@@ -34,9 +34,9 @@ class Problem10 : public Problem{
private:
//Variables
//Static variables
static uint64_t GOAL_NUMBER;
static uint64_t GOAL_NUMBER; //The largest number to check for primes
//Instance variables
uint64_t sum;
uint64_t sum; //The sum of all of the prime
public:
//Constructor
Problem10();

View File

@@ -36,8 +36,8 @@ private:
//Static variables
static uint64_t GOAL_DIVISORS; //The number of divisors that you want
//Instance variables
int64_t sum; //The sum of the numbers up to counter
int64_t counter; //The next number to be added to sum
int64_t sum; //The sum of the numbers up to counter
int64_t counter; //The next number to be added to sum
std::vector<int64_t> divisors; //Holds the divisors of the triangular number sum
public:
//Constructor

View File

@@ -42,7 +42,7 @@ private:
//Functions
//This function acts as a handler for moving the position on the grid and counting the distance
//It moves right first, then down
void move(int currentX, int currentY, uint64_t& numOfRoutes);
void move(int currentX, int currentY);
public:
//Constructor
Problem15();

View File

@@ -34,7 +34,8 @@ class Problem17 : public Problem{
private:
//Variables
//Static variables
static int TOP_NUM; //This is the largest number to get the words of
static int START_NUM; //This is the smallest number to get the words of
static int STOP_NUM; //This is the largest number to get the words of
//Instance variables
uint64_t letterCount; //This is the cumulative number of letters in the words of the numbers

View File

@@ -42,7 +42,7 @@ private:
public:
//Constructor
Problem6();
//Operational functinos
//Operational functions
virtual void solve(); //Solve the problem
virtual void reset(); //Reset the problem so it can be run again
//Gets

View File

@@ -34,9 +34,9 @@ class Problem9 : public Problem{
private:
//Variables
//Instance variables
int a; //Holds the position on the first side
int b; //Holds the position on the second side
double c; //Holds the hyp
int a; //Holds the size of the first side
int b; //Holds the size of the second side
double c; //Holds the size of the hyp
bool found; //A flag to determine if we have found the solution yet
public:
//Constructor