Amdocs Interview Question

How to find if an array contains K and K+1.