Algorithmic exercises