Add algorithm documentation