<commit_before><commit_msg>Add py solution for 654. Maximum Binary Tree<commit_after># Definition for a binary tree node.
# class TreeNode(object):
#     def __init__(self, x):
#         self.val = x
#         self.left = None
#         self.right = None

class Solution(object):
    def constructMaximumBinaryTree(self, nums, start=None, end=None):
        """
        :type nums: List[int]
        :rtype: TreeNode
        """
        if start is None and end is None:
            start, end = 0, len(nums)
        if start == end:
            return None
        m, mi = nums[start], start
        for i in xrange(start, end):
            if nums[i] > m:
                m, mi = nums[i], i
        ret = TreeNode(m)
        ret.left = self.constructMaximumBinaryTree(nums, start, mi)
        ret.right = self.constructMaximumBinaryTree(nums, mi + 1, end)
        return ret
{'fraction_non_alphanumeric': 0.10844748858447488, 'fraction_numerical': 0.005707762557077625, 'mean_word_length': 2.0034246575342465, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '325928', 'n_tokens_mistral': 276, 'n_tokens_neox': 265, 'n_words': 83}