algorithms.tutorialhorizon.com
Dynamic programming – Printer Problem | Algorithms
Given a printer which can perform only 2 operations- Printer can print consecutive identical characters in one go. It can replace consecutive characters by consecutive identical characters at any position. You are given a string input with some characters. Write an algorithm to find the minimum number of printer operations required to print the input string.