From 6069fa51d80df8905405413cb6beaf38fd4129d0 Mon Sep 17 00:00:00 2001 From: jim Date: Sat, 21 Mar 2015 09:30:32 -0400 Subject: [PATCH] spelling --- exercises/assignment5_answers.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/assignment5_answers.mdwn b/exercises/assignment5_answers.mdwn index 8e195ec0..05752763 100644 --- a/exercises/assignment5_answers.mdwn +++ b/exercises/assignment5_answers.mdwn @@ -255,7 +255,7 @@ Choose one of these languages and write the following functions. tree_walker leaf_handler joiner t 0 -9. (More challenging.) Assume you have a `color_tree` whose leaves are labeled with `int`s (which may be negative). For this problem, assume also that no color labels multiple `Branch`s (non-leaf nodes). Write a recursive function that reports which color has the greatest "score" when you sum up all the values of its descendent leaves. Since some leaves may have negative values, the answer won't always be the color at the tree root. In the case of ties, you can return whichever of the highest scoring colors you like. +9. (More challenging.) Assume you have a `color_tree` whose leaves are labeled with `int`s (which may be negative). For this problem, assume also that no color labels multiple `Branch`s (non-leaf nodes). Write a recursive function that reports which color has the greatest "score" when you sum up all the values of its descendant leaves. Since some leaves may have negative values, the answer won't always be the color at the tree root. In the case of ties, you can return whichever of the highest scoring colors you like. HERE IS A DIRECT OCAML SOLUTION: -- 2.11.0