Tripadvisor interview question

Design of data structures and complexity.