solve the data structure2 first problem