Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums[j] is at most t and the difference between i and j is at most k.
Here is my solution but I use a pair to store the value and its position. Try to find
a data structure lighter in memory. I have seen an elegant solution on the web when
comparing with mine.
hint: values are stored in a contiguous way in the main memory ;)