Travelers interview question

how to sample data (any programming language)