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.
Append and Delete
Append and Delete
Sort by
recency
|
1438 Discussions
|
Please Login in order to post a comment
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.
Java solution: public static String appendAndDelete(String s, String t, int k) {
}
I think the tests are broken
why s=y t="yu " or t="yu" k=2 should return "NO" in the 5th test case ?
Task is totally wrong. You always can delete original string and then infinitely delete emty string. Result always should be "Yes".