• + 1 comment

    Another point to note, is that After n/2, the only factor of n will be n itself. This reduces the running time of the whole algorithm