Hard
LABContains Duplicate III
Return true if two different indices are within indexDiff positions and their values differ by at most valueDiff.
EXAMPLES
Example 1
Input
{
"nums": [
1,
2,
3,
1
],
"indexDiff": 3,
"valueDiff": 0
}
Output
trueFUNCTION SHAPE
nums: intArrayindexDiff: intvalueDiff: int→bool