Camlin Group interview question

Coding puzzle about data structures and operators