[Haskell-cafe] bit of help with n-ary please...
aca08sas at shef.ac.uk
Sun Nov 8 19:28:17 EST 2009
Answers to spec.
the tree is not ordered, it holds string varying in length.
the element value is given, but not its location ie (replace "Two" "Five"
Tree a) would find the location of element "Two" and replace it with "Five"
the tree is not balanced, Nodes can have other Nodes coming off them as well
as Leaves, the number of leaves per node vary as well.
Is that ok?
Casey Hawthorne wrote:
> I don't know if this is homework.
> I suppose what you mean is the following: I'm trying to replace an
> element in an n-ary tree and display the completed tree.
> A more precise specification might help.
> - is the tree ordered
> - are all the elements in the leaves (not internal nodes)
> - is the location of the element to be replaced given?
> -- if so how?
> - is the tree supposed to be balanced?
> On Sun, 8 Nov 2009 15:40:03 -0800 (PST), you wrote:
>>> Ok what im trying to do is replace an element in an n-ary and display
>>> completed tree.
>>> So this is what ive got so far.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
View this message in context: http://old.nabble.com/bit-of-help-with-n-ary-please...-tp26258006p26259580.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
More information about the Haskell-Cafe