Algorithm diagram