Tripadvisor interview question

NP complete problem