1055: Shortest Way to Form String

Problem Statement