Email Record: Optimal algorithms :