Scott Logic interview question

Data structures, Logical Questions