
    Given a sequence of daily hospital bed occupancy records, where '1' represents over-capacity days and '0' represents normal-capacity days, find the time period that shows the largest difference between the number of normal-capacity and over-capacity days. This analysis will help identify the most significant fluctuations in bed demand patterns to optimize resource allocation.
    

    
def find_length(string):
    """
    Given a sequence of daily hospital bed occupancy records, where '1' represents over-capacity days and '0' represents normal-capacity days, find the time period that shows the largest difference between the number of normal-capacity and over-capacity days. This analysis will help identify the most significant fluctuations in bed demand patterns to optimize resource allocation.
    

    """
def find_length(string):
    """
    Given a sequence of daily hospital bed occupancy records, where '1' represents over-capacity days and '0' represents normal-capacity days, find the time period that shows the largest difference between the number of normal-capacity and over-capacity days. This analysis will help identify the most significant fluctuations in bed demand patterns to optimize resource allocation.
    

    """
    n = len(string)
    current_sum = 0
    max_sum = 0
    for i in range(n):
        current_sum += 1 if string[i] == '0' else -1
        if current_sum < 0:
            current_sum = 0
        max_sum = max(current_sum, max_sum)
    return max_sum if max_sum else 0