Minimum sum of squares of character counts in a given string after removing K characters

1 min read

https://practice.geeksforgeeks.org/problems/game-with-string/0

Sum of minimum and maximum elements of all subarrays of size K
Next smaller element