Search
⌘K
Get Premium
Leetcode 722. Remove Comments
Given an array of source-code lines, strip C++ line ("//") and block ("/* ... */") comments and return the remaining non-empty lines in order. Block comments may span lines and the input contains no quotes or other constructs that would mask comment markers, so the task is to correctly track entering/exiting block comments and ignore characters accordingly.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.