As the title says, I need an algorithm to find the smallest integer m which when divides n distinct integers leaves distinct remainders.
I know m has to be atleast n and further such an m always exist (m = max(all integers) + 1), but I don't understand how to proceed with finding the smallest m. Any help is appreciated!
Thanks