Added solution to problem 18

This commit is contained in:
2021-04-05 13:02:57 -04:00
parent 593f3902ed
commit bdd5cc36e4
2 changed files with 217 additions and 1 deletions

View File

@@ -41,11 +41,12 @@ import { Problem14 } from "./Problems/Problem14";
import { Problem15 } from "./Problems/Problem15";
import { Problem16 } from "./Problems/Problem16";
import { Problem17 } from "./Problems/Problem17";
import { Problem18 } from "./Problems/Problem18";
export class ProblemSelection{
//Holds the valid problem numbers
public static PROBLEM_NUMBERS: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17];
public static PROBLEM_NUMBERS: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18];
//Returns the problem corresponding to the given problem number
public static getProblem(problemNumber: number): Problem{
@@ -68,6 +69,7 @@ export class ProblemSelection{
case 15: problem = new Problem15(); break;
case 16: problem = new Problem16(); break;
case 17: problem = new Problem17(); break;
case 18: problem = new Problem18(); break;
}
return problem;
}