Added solution to problem 8

This commit is contained in:
2021-03-10 19:16:08 -05:00
parent 40a4d3c1ef
commit 429351e363
2 changed files with 131 additions and 1 deletions

View File

@@ -31,11 +31,12 @@ import { Problem4 } from "./Problems/Problem4";
import { Problem5 } from "./Problems/Problem5";
import { Problem6 } from "./Problems/Problem6";
import { Problem7 } from "./Problems/Problem7";
import { Problem8 } from "./Problems/Problem8";
export class ProblemSelection{
//Holds the valid problem numbers
public static PROBLEM_NUMBERS: number[] = [1, 2, 3, 4, 5, 6, 7];
public static PROBLEM_NUMBERS: number[] = [1, 2, 3, 4, 5, 6, 7, 8];
//Returns the problem corresponding to the given problem number
public static getProblem(problemNumber: number): Problem{
@@ -48,6 +49,7 @@ export class ProblemSelection{
case 5 : problem = new Problem5(); break;
case 6 : problem = new Problem6(); break;
case 7 : problem = new Problem7(); break;
case 8 : problem = new Problem8(); break;
}
return problem;
}