commit 8b55f7357b1cda7e680645f593a612331c9fba9d
parent c359b7671e6f7fec0fa1fbcc6ea495a7703d8005
Author: AndrewLockVI <andrewlaack1@gmail.com>
Date: Sun, 14 May 2023 13:41:48 -0500
Completed path with maximum gold using DFS, recursion, and backtracking
Diffstat:
1 file changed, 0 insertions(+), 1 deletion(-)
diff --git a/path-with-maximum-gold/path-with-maximum-gold.dart b/path-with-maximum-gold/path-with-maximum-gold.dart
@@ -1,7 +1,6 @@
//This solution uses recursion to traverse through a matrix where each tile has gold and the
//player can only move one tile at a time. You need to return the highest amount of gold that can be
//collected without ever stepping on a spot that has 0 gold.
-//The time complexity of this code is O(4^n) where n is the number of values in the matrix.
//Time: 1510ms Beats: 100%
//Memory: 181.6MB Beats: 100%
class Solution {