The question is as such
You are given string s1 = “” and a string s2 = “abcbcaa” You can perform any one of the two operations on s1 : Append a new character to s1. This costs you A dollars. or Append an existing substring of s1 to s1. This costs you B dollars. Find the minimal dollars you need to pay in order to convert s1 to s2 This is not from any ongoing contest you can find it here https://www.geeksforgeeks.org/teksystems-interview-experience-on-campus/ question1 @waqar_ahmad224 @everule1 Please help.