LeetCode 722: Remove Comments
Problem Restatement We are given a C++ program as a list of strings: source Each string is one line of code. We need to remove two kinds of comments: Comment Type Meaning Line comment // Ignore // and everything after it on the same line Block comment /* ... */ Ignore everything from /* until the next non-overlapping */ After removing comments, return the remaining source code as a list...