WGSN interview question

Coding question