Slow day but almost Done* with assignment 1
|
Worked for a few hours before lunch today, got to school later than i’d hoped but i was up late so i got there by ten rather than by nine. During the time i did work i didn’t get that much done other than some cleaning up my functions in the binary search tree class. I fixed the issue about not relocating children properly when removing a node. In any case, have written the functionality of everything required for the assignment except the unit testing which i can’t do until i have functions to test. The functions i haven’t tested are the traversal ones for the binary search tree (one of which shown in the image). traversal_in_order in this case contains a recursive function within itself. The function in this case returns a list filled with the values in the search tree by order of top to bottom. It starts at the “root” node, writes out that node’s value and then checks it’s children for other nodes, if another node is found the function calls itself but uses the child node as the base. It does this for both children. This creates a recursive loop which will check every node until it reaches all nodes with zero children. In nay case, what i have left to do is to make this function work properly as i cannot find the right place to put the recursive function. It seems wherever i put it, i get error messages. Tomorrow i will ask someone for help with this. I will also ask about removing the pointers and variables properly since i’m unsure on how to have both properly removed. After that i only have the unit testing left which should be fairly simple. At wort i’ll have to finish the work this weekend. If not, i can begin on the second assignment. |