solution to data structure problem statements..