discuss algorithm