Exercises in basic algorithms