0 out of 68 challenges solved

Find the largest value in a tree

Question:
Write a function called find_largest_value_tree that takes a tree structure as input and finds the largest value in the tree. The tree structure is represented as nested lists, where each list can contain either numbers or nested lists. The function should return the largest value found in the tree.

Example:
Input: [1, [2, [3, 4], 5], 6]
Output: 6

def find_largest_value_tree(tree):
    """
    Finds the largest value in a tree structure.

    Args:
    tree (list): The input tree structure.

    Returns:
    int: The largest value found in the tree.
    """
    # TODO: Implement the find_largest_value_tree function
    pass