Will work fine even if duplicates are zero