Educative

If I update the maxrepeating for each window, is the complexity still O(N)?

Hi, I know optimally we do not need to update maxrepeating letter for each window
that being said, I do this question without looking at the solution at first and I update the maxrepeating for each window, I just want to confirm that in this case the complexity is still linear correct ?
since we basically just need to iterate through the dictionary and finding max value, and at worst case when dictionary is full it is O(26)

Can you please share your full solution?