Hi, I need help for with full java code for the following Problem:
Problem: Given string data representing a mathematical expression, determine the possible location(s) of the missing parenthesis. Although we show spaces between characters for readability the input strings have no spaces. All operands will be single digits. Given (2+3*6+1. A right parenthesis is missing. It could be correctly places in several locations. (2+3)*6+1 Location 5 (2+3*6)+1 Location 7 (2+3*6+1) Location 9 Input: There will be five lines of input. Each line will contain a string of characters with no spaces representing a mathematical expression. Each expression will have either a single left or right parenthesis. The operators used will be: +, -, * and /. Output: For each line of input, list all the locations in that expression where the missing left or right parenthesis can be correctly placed. Note: Single digits are never enclosed. Sample Input Sample Output 1. (2+3*6+1 1. 5,7.9 2. 2-5*(6+1 2. 9 3. 5+5-2)*5 3. 1,3 4. 3*5 + (8/4*2 4. 9,11 5. 2+8/4*5) 5. 1,3,5