Guest User

Untitled

a guest
May 27th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. def sum_heights(nodes_array):
  2. result = 0
  3. for node in nodes_array:
  4. result = result + node.height
  5. return result
  6.  
  7.  
  8. def sum_widths(depth_nodes):
  9. result = 0
  10. for depth in depth_nodes:
  11. max_width = 0
  12. for node in depth_nodes[depth]:
  13. if max_width < node.width:
  14. max_width = node.width
  15. result = result + max_width
  16. return result
Add Comment
Please, Sign In to add comment