Data Structures and Algorithms homework part 1