You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
drawtree works for integer nodes. I was trying to draw a huffman tree with it - it gave an error when trying to do an int conversion of a letter. The code is in deserialize function:
nodes = [None if val == '#' else TreeNode(int(val))
for val in string.strip('[]{}').split(',')]
When I removed the int call, I got the tree. Is it not possible to support alphanumeric nodes by doing so?
Regards.
The text was updated successfully, but these errors were encountered:
Hi,
drawtree
works for integer nodes. I was trying to draw a huffman tree with it - it gave an error when trying to do anint
conversion of a letter. The code is indeserialize
function:When I removed the int call, I got the tree. Is it not possible to support alphanumeric nodes by doing so?
Regards.
The text was updated successfully, but these errors were encountered: