Question: I'm confused about why we have two sets of parameters(one for inorder traversal; the other for preorder traversal) for the build_tree function since we can only return one node when calling the build_tree function.
Question2: Can't find a way to add a tag to my post.
Arrvindh Shriraman
unread,
Sep 22, 2020, 12:44:22 PM9/22/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cmpt-295-sfu
You are expected to construct the post order given the inorder and preorder.
Read the assignment instructions and rephrase (if you have a question).
b.minh96
unread,
Sep 22, 2020, 12:52:42 PM9/22/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cmpt-295-sfu
The number of parameters passed in the function are not relevant to the fact that one node is returned.
Note that a node has connections to other nodes (left, right) as well, so when a node is returned you have enough information of a tree.
shiyi Chen
unread,
Sep 24, 2020, 8:01:03 PM9/24/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message