tests for a and b

This commit is contained in:
2025-03-21 00:36:58 +01:00
parent 69053634be
commit 5f1cc196c8
6 changed files with 497 additions and 964 deletions

23
ex6_recursion.md Normal file
View File

@ -0,0 +1,23 @@
# Aufgabe 6 - Rekursion - 20P
## a - `sum_of_subtree` - 10P
- Basisfall `None` [3P]
- Rekursiver Fall:
- Aufruf der Funktion auf `left` und `right` [3P]
- Addition der Teilbaum Summen [1P]
- Setzen von `tree.mark` [2P]
- Rückgabe der Summe [1P]
- Pattern Matching nicht verwendet [0P]
## b - `cut_at` - 10P
- Basisfall `None` [3P]
- Basisfall `mark == at` [3P]
- Dieser Fall konnte auch mit dem Rekursiven Fall kombiniert werden (`if mark == at` ist okay :))
- Rekursiver Fall:
- Aufruf der Funktion auf `left` und `right` [3P]
- Rückgabe des neuen Baumes [1P]
- Pattern Matching nicht verwendet [0P]