Problem Statement | |||||||||||||
You are converting old code for a new compiler version. Each "->" string should be replaced by ".", but this replacement shouldn't be done inside comments. A comment is a string that starts with "//" and terminates at the end of the line. You will be given a String[] program containing the old code. Return a String[] containing the converted version of the code. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | program will have between 1 and 50 elements, inclusive. | ||||||||||||
- | Each element of program will contain between 1 and 50 characters, inclusive. | ||||||||||||
- | Each character in program will have ASCII value between 32 and 127, inclusive. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
|