NCAAT algorithm