Find a number in the array having least difference with the given number (n) -- Facebook