Find the growth % of rolling three months for every month between two different years.
Asked in the onsite round 3 stage.
Implement rolling_three_month_growth(first_year, second_year, first_months, second_months). Each month list contains numeric values in calendar order for the same number of months in two different years. For every month from month 3 onward, compare the sum of that month and the previous two months between the years. Return a list of dictionaries containing the second_year, month number, and growth percentage rounded to two decimal places. If the first year's rolling sum is zero, use null for the growth percentage.
Return results ordered by month, with keys year, month, and growth_percent.
def rolling_three_month_growth(first_year, second_year, first_months, second_months):