some code of data structure exercise