study algorithms in c: add source code 1-1