Facebook | Phone Screen | Remove comments from source code

6162
Oct 07, 2016
Aug 07, 2019

Given a file path represented as string, take this input string and remove all the comments in the file, print this file or save this to a new txt file by your choice.

cases to consider:
// comment
/*

  • comment
    */
    foo(); // comment
Comments (5)