Please consider offering answers and suggestions to help other students!
And if you fix a problem by following a suggestion here,
it would be great if other interested students could see a short
"Great, fixed it!" followup message.
Hi,
I'm a little bit confused as to how these questions are differemt.
Q1 Write a simple description of how you are going to represent the problem as a data structure.
Your description should justify how the representation is going to help you solve th...
I believe the first question is asking is what data structure you are going to use to represent the hierarchical structure family tree of the kiktils, whilst question 6 is asking about all the other data structures you used to implement the other met...
Hi bill, question 6 did ask for complexity as well. Question 6 is asking why your solution is correct as well as the time complexity of your solution. Here is my answer that I got full marks for
Question 6 (1 mark)
Give an argument for the correctn...
Hi there, just wanted to clarify some assumptions about the lab
1. Can we assume that no 2 kiktil will have the same name? I'm assuming this will be the case as if 2 kiktils had the same name, it would make the get cousin dist() function impossible t...
Tree ADT is covered in lecture 15, which I believe will be covered in the wed thurs lectures. Of course you can study the slides yourself and use the internet to study up. The lab becomes pretty self explanatory after you understand the tree ADT.
For question 6, what sort of answer is expected of us? I understand it wants the function and purpose of chosen data structures but the justification for the chosen data structures are also asked for in question 1. Is question 6 just question 1 witho...
There is an explanation under the function in genealogy.py that explains how to calculate it.
If you draw a diagram of the test sample genealogy, you can see who is related to who and find their closest shared ancestor. Then, from this shared ancesto...
I found that only the absolutely simplest structure lets me have O(1) so simple data structures built into python are a good start on finding the right one.
Nothing about the algorithm or anything, I'm just genuinely confused at the values I need to return for this function.. can anyone explain what the question meant by "degree and removal of the cousin relation". Reading the expected results of the tes...
Is O(1) achievable?
The add child function asks for a target of O(1), a tree data structure wouldn't be able to achieve this, finding from root the parent to link the child would be O(n). A set would meet O(1) but would have trouble with get primogen...
Just had a look over lab four and it seems to cover implementing something like a tree diagram but in python form. Are the lectures still behind on the content for this lab even though its assessed?