Yahoo Interview Question

it was related to datastructures