Added solution to problem 22

This commit is contained in:
2021-04-08 11:54:06 -04:00
parent 96f32e6c53
commit 019990e3f2
2 changed files with 484 additions and 1 deletions

View File

@@ -45,11 +45,13 @@ import { Problem18 } from "./Problems/Problem18";
import { Problem19 } from "./Problems/Problem19";
import { Problem20 } from "./Problems/Problem20";
import { Problem21 } from "./Problems/Problem21";
import { Problem22 } from "./Problems/Problem22";
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, 18, 19, 20, 21];
public static PROBLEM_NUMBERS: number[] = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22];
//Returns the problem corresponding to the given problem number
public static getProblem(problemNumber: number): Problem{
@@ -76,6 +78,7 @@ export class ProblemSelection{
case 19: problem = new Problem19(); break;
case 20: problem = new Problem20(); break;
case 21: problem = new Problem21(); break;
case 22: problem = new Problem22(); break;
}
return problem;
}