some practice of basic algorithms with java