Quantiphi interview question

Some random question based on data structures