Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
- Design a Data Structure with Insert, Remove, and GetRandom for Unique Elements in O(1)
Coding
- Design a Song Playlist with Add/Remove Functions
Coding
- Find and remove duplicate files
Coding · File & Media Storage · Operating Systems
- Find Minimum Cost to Remove Array Elements
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 722. Remove Comments
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source