Sectra Interview Question

I was given a riddle to solve mid-interview.