Daily Challenge (263 Part Series)
The first document has parts redacted, and the other one doesn't. But the clean document might be a fake! You need to compare the two documents and decide if it is possible they are the same or not. Return
true if the two documents are possibly the same. Return
- Each document is made of any visible characters, spaces, punctuation, and newlines \n
- Any character might be redacted (except
- The redaction character is
- The redacted document is always the first one
doc1 = "TOP SECRET:\nThe missile launch code for Sunday XXXXXXXXXX is:\nXXXXXXXXXXXXXXXXX"
doc2 = "TOP SECRET:\nThe missile launch code for Sunday 5th August is:\n7-ZERO-8X-ALPHA-1"
Documents look the same, therefore
doc1 = "The name of the mole is Professor XXXXX"
doc2 = "The name of the mole is Professor Dinglemouse"
doc1 = "XXXXXXXX XXXXXXX XXXXXXXXXXXXXXXXXXX\nXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXX XXXXXXXXXXXXX XXXXX"
doc2 = "Area-51. Medical Report. 23/Oct/1969\nE.T. subject 4 was given an asprin after reporting sick for duty today"
Want to propose a challenge idea for a future post? Email firstname.lastname@example.org with your suggestions!