00:21:47 Carlo Giuseppe Tomazzoli: (It's a mutable structure, Ale. So if I mistakenly mutated it in one of the recursive calls, it would yield unexpected results.) 00:22:30 Alessandro vecchi: Oh right 00:22:34 Carlo Giuseppe Tomazzoli: Federica: you can pass the values you need along, as an argument to your recursive function. 00:22:41 Alessandro vecchi: And what’s the solution then? 00:23:16 Iliyas Alimzhan: the hardest one yet 00:23:22 Carlo Giuseppe Tomazzoli: (either use an immutable object such as frozenset or string, or pay extra close attention) 00:23:48 Federica Valeau: Thank you! 00:25:14 federica bruni: Hw8 is trivial 00:25:33 Alessandro vecchi: I really think that the hardest one is the hw4 rec. 00:26:45 Alessandro vecchi: The final part is crazy 00:29:40 Iliyas Alimzhan: I don't understand how there should be a recursion in the empty test 00:30:25 Alessio Borgi: Professor Sterbini has deactivated that test fortunately. 00:31:00 Iliyas Alimzhan: thank god 00:31:13 Iliyas Alimzhan: XD 00:31:24 Yigit Oztekin: really regretting not studying Italian rn 00:34:45 Stefano Colonnelli: can I write my recursive function as a method of a class? 00:37:31 Mattia Tennenini: YES 00:37:47 Federica Valeau: The deadline for the recovery homework is before the exam, right? 00:38:07 Federica Valeau: Okay, perfect 00:39:07 Stefano Colonnelli: if i missed only one of the homeworks i can do the recovery one to be able to attend the exam right? 00:39:32 Alessandro vecchi: When will the final results of the hw6 come out? 00:41:46 Alessandro vecchi: Perfect thanks 00:42:02 Stefano Colonnelli: thanks :) 00:42:18 Mattia Tennenini: can we book the exam even if we need to recover a homework? as long as we can do the remaining one before the deadline of the exam 00:43:35 Federica Valeau: Will it be mandatory to use classes during the exam? 00:43:47 Stefano Colonnelli: the grade needs to be >= 18 for the HW right? 00:43:55 Stefano Colonnelli: to attend the exam 00:43:58 Federica Valeau: Great, thanks 00:44:46 Mattia Tennenini: Thanks! 00:46:08 Alessio Borgi: Do I have to delete the booking and book again if the date of the first session changes? 00:46:29 Mattia Tennenini: are the old exam exercises an idea of what we have to expect during the lab exam? 00:47:00 Mattia Tennenini: Thank you! 00:50:15 Alessandro vecchi: Sorry prof but the homework part have a mark up to 10 for the final grade or we can have also more than 10?(like for example 32,30,34,30 and 1 point of bonus) 00:51:44 Alessandro vecchi: Yeah sure but (32+30+34+30)/4+1 right? 00:51:54 Alessandro vecchi: For the first part 00:52:28 Alessandro vecchi: Yes sure so we can compensate great 00:55:25 Davide Marincione: Doing them right now- got to 9 01:01:48 Alessandro vecchi: def find_max(tree): if not tree.left and not tree.right: return tree.value max1, max2 = tree.value, tree.value if tree.left: max1 = find_max(tree.left) if tree.right: max2 = find_max(tree.right) return max(max1, max2, tree.value) 01:01:54 Alessandro vecchi: maybe 01:02:25 Alessandro vecchi: But it’s the max of the tree not of the nodes/leaves 01:13:00 Alessandro vecchi: Btw this is still the max of the tree not the max of the nodes right? 01:14:00 Alessandro vecchi: tree=leaves+nodes 01:14:09 Alessandro vecchi: Ahh ok 01:14:38 Carlo Giuseppe Tomazzoli: Leaf = node — node without leaves 01:16:29 Alessandro vecchi: And what’s the base case if I wanted to return the max of the internal nodes? 01:17:05 Carlo Giuseppe Tomazzoli: Would fail if all nodes are negative. 01:17:42 Alessandro vecchi: Tree.value instead of 0 should be fine 01:22:33 federica bruni: max_leaf instead of max_node? 01:23:33 Carlo Giuseppe Tomazzoli: max(tree.right or tree.left, tree.left or tree.right) 01:23:36 Carlo Giuseppe Tomazzoli: Would that work? 01:24:00 Alessandro vecchi: But aren’t we appending also the not leaf nodes ? 01:28:33 Alessandro vecchi: Sorry prof but I still don’t understand the difference between max_node and max_leaf. 01:33:38 Alessandro vecchi: maybe 01:34:08 Alessandro vecchi: ok 01:38:05 Yigit Oztekin: same here 01:38:09 Alessio Borgi: Yea it's all black 01:38:15 Nicholas Tiveron: it's all black 01:38:25 Alessio Borgi: Now yes 01:43:02 Carlo Giuseppe Tomazzoli: Post order ?= RPL 01:44:06 Davide Marincione: Racket/Scheme programming 01:44:21 Davide Marincione: Don't really want to see it again in my lifetime 02:12:18 Davide Marincione: Bye! 02:12:24 Mattia Tennenini: Thank you! Bye! 02:12:26 Alessio Borgi: Thank you, Bye. 02:12:30 Alessandro vecchi: Bye!! 02:12:32 Tassybayev Sauryk: thanks! bye. 02:12:32 Nicholas Tiveron: Thanks, bye!