Hopper interview question

it was take home with some sample data given