I have an unsorted array of `n` positive numbers and a parameter `k`, I need to find out if there is a pair of numbers in the array that the difference between than is less than `k` and I need to do so in time complexity of `O(n)` on probable average and in space complexity of `O(n)`.

I believe it requires the use of a universal hash table but I'm not sure how, any ideas?