We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Test-3 s = "zzzzz" t = "zzzzzzz" k = 4 , how come the answer should be "Yes"? I mean how it is possible to convert s into t with exactly 4 operations? That is if we perform two append-operations and two delete-operations, with 4 operations the strings won't be same. On the otherhand if we perform four append-operations and two delete-operations the strings will be same but number of operations > k, Thus, probably the test is not correct.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Append and Delete
You are viewing a single comment's thread. Return to all comments →
Test-3 s = "zzzzz" t = "zzzzzzz" k = 4 , how come the answer should be "Yes"? I mean how it is possible to convert s into t with exactly 4 operations? That is if we perform two append-operations and two delete-operations, with 4 operations the strings won't be same. On the otherhand if we perform four append-operations and two delete-operations the strings will be same but number of operations > k, Thus, probably the test is not correct.