eDreams ODIGEO interview question

Very basic algorithm questions like iterating elements based on conditions.