Tripadvisor Interview Question

interpret code segment