Shift Lab (UK) interview question

Coding exercise to do on my own pace