exercise about algorithm/system