Wang Xiaodong algorithm design JAVA example 2_11