reword problem
authorjim <jim@web>
Wed, 4 Mar 2015 23:23:21 +0000 (18:23 -0500)
committerLinux User <ikiwiki@localhost.members.linode.com>
Wed, 4 Mar 2015 23:23:21 +0000 (18:23 -0500)
exercises/assignment5.mdwn

index 0494fa7..c72ce6d 100644 (file)
@@ -144,7 +144,7 @@ Choose one of these languages and write the following functions.
               2   2
     </pre>
 
-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 the the same color never labels multiple inner branches. 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 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.
 
 
 ## Search Trees ##