From f3b7b062eab30aa8a31f8ade402173df26b002821d3500c5e006e2b0d8b49d25 Mon Sep 17 00:00:00 2001 From: Mars Ultor Date: Fri, 18 Apr 2025 13:37:37 -0500 Subject: [PATCH] missing bracket --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b35c18e..1c6ce03 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ fn find_min(cache: &mut HashMap, target_sum: u64, coins: &Vec) -> cache.insert(target_sum, u64::MAX); // Mark as unreachable return None; } +} ``` Essentially, the purpose of the above code is to traverse a tree of possible coin decisions. As long as the coin denomination is smaller than the target, it's possible to recursively iterate through all combinations of coins while both caching and checking for a base case. This behavior is called memorization. The base case for any branch of the tree is when the target sum is equivalent to the coin of interest.