Python: pass “mutable integer” in recursion
I’m working on some code to find the max depth/height in a tree. I came up with a recursive solution, and I find myself needing to pass an integer “by reference”. Currently, I’m using a mutable container to achieve this, but is there a more Pythonic way? class Node: “”” Node in a tree, with … Read more