The first comment is given precedence over the other i.e. if the string “//” occurs in a block comment, then it is ignored and/or if the string “/*” occurs in a line or a block comment, it is also ignored. The starting and ending point of the block comment must be non-overlapping i.e. a string like “/*/” does not end the block comment, as the ending would be overlapping the beginning. Every starting point of a block comment will have an ending point as well. The (implicit) newline characters which may occur when a block comment spans multiple lines, must be deleted/removed. The text doesn’t contain any single or double quotes characters.
The very first line of input contains an integer ‘N’ denoting the number of lines in the given text. Now ‘N’ lines follow where the ith line contains a string that denotes the ith line of the text.
For each test case, print the text, in the same format, obtained after removing the comments.
If a certain line of the text becomes empty after removing the comments, you must not output that line i.e. each string in the resulting text must be non-empty. You do not need to print anything, it has already been taken care of. Just return the resulting text in the same format.
1 <= N <= 100 0 <= Length of ith String <= 5 * 10^3 Where ‘N’ represents the number of lines in the given text. Time Limit: 1 sec
Ninja and Numbers
Longest Palindromic Substring