bp interview question

Was regarding data structures and algo