Given an integer array nums with n values and a value k, return an array containing the number of neighbours for each element of the array.
An element x is the neighbour of element y if x falls in the range [y-k, y+k] (inclusive).
Your notes are automatically saved in your browser's local storage and will persist across sessions on this device.