The key here is to traverse through the input array and find out number of consecutive integers.
1. Add all the integers from an input array to a HashSet
2. Loop through the input array. For each element, calculate the number of consecutive right (integer + 1) or consecutive left (integer - 1) integers by checking their presence in the set created above.
3. At the end of the iteration, return the max count.