Sunday, September 15, 2013

Topcoder SRM 587 DIV 2 L1 InsertZ

// Topcoder SRM 587 DIV 2 L1 InsertZ

import java.util.*;
import java.math.*;

//rename the class name before submitting
public class InsertZ {
public static void main(String[] args) {
InsertZ obj = new InsertZ();
System.out.println(
obj.canTransform(
"", ""
));
}

public String canTransform(String init, String goal) {
String s = goal.replaceAll("z", "");
if (s.equals(init))
return "Yes";
return "No";
}
}

No comments:

Post a Comment