We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I don't see how exactly your solution is different. Additionaly, temp has a local scope and leaves the root un bothered in the original solution. I can't really see how your solution improved the former
I know this is old but...
Python is all about clarity (arguably, all languages should be, but python in particular).
We might discuss about the need to create functions just to move along the tree, but variable names are not something that can just be overlooked.
Tree: Huffman Decoding
You are viewing a single comment's thread. Return to all comments →
I don't see how exactly your solution is different. Additionaly,
temp
has a local scope and leaves theroot
un bothered in the original solution. I can't really see how your solution improved the formerI know this is old but... Python is all about clarity (arguably, all languages should be, but python in particular). We might discuss about the need to create functions just to move along the tree, but variable names are not something that can just be overlooked.