Learning basic algorithms