You are viewing a single comment's thread. Return to all comments →
That is easy :)
Just make your string to be like the one in input.
String input=sc.next().replaceAll("[^\\(\\)\\[\\]\\{\\}]", ""); while(input.length() != (input = input.replaceAll("\\(\\)|\\[\\]|\\{\\}", "")).length()); System.out.println(input.isEmpty());
Make note of one additional part appeared:
.replaceAll("[^\\(\\)\\[\\]\\{\\}]", "");
Seems like cookies are disabled on this browser, please enable them to open this website
Save the Prisoner!
You are viewing a single comment's thread. Return to all comments →
That is easy :)
Just make your string to be like the one in input.
Make note of one additional part appeared: