Minimal moves to form a string by adding characters or appending string itself
Given a string S, we need to write a program to check if it is possible to construct the given string S by performing any of the below operations any number of times. In each step, we can: Add any character at the end of the string.or, append the string to the string itself.The above steps can be ap