source code implements of algorithm introduction edtion 2