educative.io

Why is the space complexity of the sliding window solution O(1)?

There are more than 1 variables that are stored (max_sum , window_sum, window_start), why is the space complexity O(1)?

My understanding is because the amount of space we need is fixed regardless of the size of the input list (n)
If the list’s size is 100 or the list’s size is 1,000,000, we still need the same amount of space, therefore, the space complexity is O(1)
Thanks