Facebook | Phone
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2021-10-23Added By Anonymous
Source: Link
Company: Meta (Facebook)
Role: unknown
Interview Stage: Phone Screen
Location: unknown
Year: unknown
Original Post Content:
Given a red tape and a set of blue tapes. Tape is represented by interval. We paste red tape on the line first and paste blue tapes onto the line later. If blue tapes have overlap with red tape, the overlapping part will be covered by blue tapes. You need to return a boolean to indicate whether red tape is visible at the end.
Ex: [12,21] and [-1,6] -1,-6 and [12,21]
Blue ~~~~~~~~~~~~~~~~~~~~~~~~~ [12 21]
Red ===============================
[-1,6] |-----|-----|-----|-----|-----|-----|-----|-----|-----| 0 1 2 3 4 5 6 7 8 9