A Cox Automotive USA vehicle inventory feed contains sequential numeric values such as daily listing activity or pricing adjustments. Given an integer array and a fixed window length, return the maximum total of any consecutive sequence containing exactly windowSize values.
Implement:
def max_window_total(values, windowSize):
The window must contain adjacent elements, and it may begin at any valid index. The input array must not be modified. Aim for a single-pass solution with constant additional space. Consider negative values and totals that exceed a 32-bit integer during intermediate calculations.
values, a non-empty array of integers, and windowSize, an integer.windowSize.def max_window_total(values, windowSize):