+ 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.

12th Sep 2017, 2:44 PM
Seb
3 odpowiedzi
12th Sep 2017, 4:27 PM
Joe McMillan
Joe McMillan - avatar
0
classe A { static boolean check(String str){ } }
12th Sep 2017, 2:45 PM
Seb