data structures and algorithm Chapter2