Tin Roof Software interview question

The only question that was difficult was a data structure problem