def insert(self, root, val):
        """
        :return: subtree's root after insertion
        """
        if not root:
            root = Node(val)

        if root.val == val:
            root.cnt_this += 1
        elif val < root.val:
            root.cnt_left += 1
            root.left = self.insert(root.left, val)
        else:
            root.right = self.insert(root.right, val)

        return root
dataset/ETHPy150Open algorhythms/LintCode/archive/Count of Smaller Number before itself.py/BST.insert/original