Suppose we have an array in the size of n, with values range from 0 to n-1. A function that validates that there are no duplications of values is needed, without using another array.
Prototype: bool UniqueValues(unsigned arr[], size_t n);
This is an algorithm question for job interviews, please don't suggest using built-in std functions.