[Solved] question on array and number
Interesting problem. If the array is of signed integers, I believe it is possible in O(n) time and O(1) space, with no overflows, assuming the length is small enough to permit such a thing to happen. The basic idea is as follows: We have n numbers. Now on dividing those numbers by n+1, we get … Read more