Pocket Gem电面

原帖地址:一亩三分地

2面 碰到一个三哥, 考了一道非常规题, 其他的都是它家常规题

题目:
Given constants k1 and k2 and an array return whether the array contains 2
indices i and j such that j-i <= k1 and absolute value of abs(array[j]-array[i]) <= k2 example: {2,100,200,5} k1 = 3 k2 = 3