Yahoo interview question

it was related to datastructures