Lonely Planet coding challenge