Back to course home
0% completed
Vote For New Content
For the previous problem, we kept track of the *maximum* count of a single lette...
Pete Stenger
Aug 9, 2022
For the previous problem, we kept track of the maximum count of a single letter to make sure the window size never dips below the maximum count of a letter, and are needlessly evaluating solutions.
It appears the solution for this problem doesn't have this optimization, is there a reason why?
It looks as if 'maxOnesCount' is really 'onesInWindow', and the optimization to skip these unneeded solutions is missing.
2
0
Comments
Comments
On this page