Bonus challenge for week 4

This commit is contained in:
Josh Ashton
2023-09-27 13:36:39 -06:00
parent aeb9b2ab12
commit 106f4b17c3
2 changed files with 41 additions and 2 deletions
+26
View File
@@ -0,0 +1,26 @@
/**
* In this week's club bonus challenge, you will be tasked with solving grid traversal problem.
*/
public class Week4 {
/**
* In a 2x2 grid, there are exactly 6 routes from the top-left corner to the bottom-right corner.
* Find an algorithm to find the number of routes in a 20x20 grid.
*
* Credit: Project Euler Problem 15.
*
* HINT: Recursion, recursion, recursion, recursion, recursion, recursion, recursion, recursion, recursion, recursion...
*/
public static long problem1() {
return -1; // TODO
}
/**
* Test driver should not be edited!
*/
public static void main(String[] args) {
long ans1 = problem1();
System.out.println(ans1 == 137846528820 ? "Problem 1 is correct!" : "Problem 1 (" + ans1 + ") is not correct...");
}
}