Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sum_heights(nodes_array):
- result = 0
- for node in nodes_array:
- result = result + node.height
- return result
- def sum_widths(depth_nodes):
- result = 0
- for depth in depth_nodes:
- max_width = 0
- for node in depth_nodes[depth]:
- if max_width < node.width:
- max_width = node.width
- result = result + max_width
- return result
Add Comment
Please, Sign In to add comment