Added solution to problem 9

This commit is contained in:
2021-03-24 16:43:54 -04:00
parent 429351e363
commit 2f0161e4aa
2 changed files with 148 additions and 1 deletions

View File

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