week 2 challenge

This commit is contained in:
Joshua Ashton
2024-02-04 15:54:05 -07:00
parent f0a34db016
commit 7876f90b48
30 changed files with 101 additions and 3 deletions
+28
View File
@@ -0,0 +1,28 @@
package fall23.Week4;
/**
* In this week's club bonus challenge, you will be tasked with solving grid traversal problem.
*/
public class Week4Bonus {
/**
* 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 == 137846528820L ? "Problem 1 is correct!" : "Problem 1 (" + ans1 + ") is not correct...");
}
}