reset password
Author Message
arstan
Posts: 9
Posted 17:44 Apr 23, 2018 |

"Construct a binary search tree using the tree nodes you created, according to the ages of students."

Can I have clarification on what this is asking for. 
 

msargent
Posts: 519
Posted 17:46 Apr 23, 2018 |

Binary trees are ordered according to a value. The value that orders this binary tree is student age. Each tree node has a student, use the student's age to determine where to put each node.

For more on binary trees:

https://en.wikipedia.org/wiki/Binary_tree

TonyOs1
Posts: 13
Posted 01:22 Apr 24, 2018 |

"...using the tree nodes you created..."
Does this refer to the same thing we created in 4A, the problem before it? "Read the csf...and produce a list of students."

If so, are we able to use "makeNode" and have Student be passed for x? Or should we create a whole new Node?
I thought I heard that we can't/shouldn't use built-in Haskell nodes, so I just want to make sure.

msargent
Posts: 519
Posted 11:45 Apr 24, 2018 |

The tree nodes should contain a student. Use the age of the student for where to place the node.