Flow Traders interview question

logical