algorithm memo