"Write a function call 'update' which takes a BST, a key, and a string
and returns a BST where the key's value has been updated. Do not use
mutation."
You must write a function named update. It will take three arguments:
tree, key, and newValue. It should return a new tree where the key
gets mapped to newValue. How could I write the instructions any
differently?
Separately, you must answer the question:
"What is the fewest number of new nodes that must be created to update
the tree so that 15 is mapped to "Fifteen" rather than "十五"?"
Jay
>
> Thanks.
--
Jay McCarthy <j...@cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay
"The glory of God is Intelligence" - D&C 93
So we update the Japanese String values to their English equivalent?
I still don't really get the separate question... Is there a limit to the number of nodes you have before you can update the tree?
No. You write a function that can update any key to any value.
>
> I still don't really get the separate question... Is there a limit to the number of nodes you have before you can update the tree?
I don't know what this means.