Maximize the Number of Partitions After Operations
10038.MaximizetheNumberofPartitionsAfterOperationsclassSolution:defmaxPartitionsAfterOperations(self,s:str,k:int)->int:s=[ord(c)-ord('a')forcins]@cachedefdp(idx,left,seen):ifidx==len(s):return0ss=seen