Sum of all vertical levels of a Binary Tree

  

class TreeNode:
    def __init__(self, val =”,
                 left = None, right = None):
        self.val = val
        self.left = left
        self.right = right
  

def getDecimal(arr):
  
    
    
    
    arr.sort()
  
    
    
    
    ans = 0
  
    
    for i in range(len(arr)):
        ans