Returns the minimum cost to form a n - copy string Here , x -> Cost to add / remove a single character ' G ' and y -> cost to append the string to itself
function findMinimumCost ( n , x , y ) { let dp = new Array ( n + 1 ) ;