Solace interview question

the question on stacks