+ 1
Do you rise to the challenge !?
You are given a sequence of characters consisting of parentheses () and brackets []. A string of this type is said to be correct : if it is an empty or null string, the string A is correct, (A) & [A] are correct and if the string A and B are correct, the concatenation AB is also correct Exp : [()] & (()[]) are correct, ([)] & (( aren't correct Implement the method check(String str) to check the correctness of a string of this type. check returns true if the string is correct, false otherwise. https://code.
3 ответов
+ 4
https://code.sololearn.com/c0GdAuz1dIGN/?ref=app
Check it out. ☺
0
classe A {
static boolean check(String str){
}
}