HardMinimum Partition Count with Length and Range ConstraintsDynamic ProgrammingSliding Window+1Code MasterSolve