Added solution to problem 15

This commit is contained in:
2021-03-29 11:26:47 -04:00
parent f9522b13d6
commit 4a0f9b3fe0
3 changed files with 114 additions and 4 deletions

View File

@@ -38,11 +38,12 @@ import { Problem11 } from "./Problems/Problem11";
import { Problem12 } from "./Problems/Problem12";
import { Problem13 } from "./Problems/Problem13";
import { Problem14 } from "./Problems/Problem14";
import { Problem15 } from "./Problems/Problem15";
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];
public static PROBLEM_NUMBERS: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
//Returns the problem corresponding to the given problem number
public static getProblem(problemNumber: number): Problem{
@@ -62,6 +63,7 @@ export class ProblemSelection{
case 12: problem = new Problem12(); break;
case 13: problem = new Problem13(); break;
case 14: problem = new Problem14(); break;
case 15: problem = new Problem15(); break;
}
return problem;
}