datastructure: finish chapter 2