Therefore lets write the code for this function. We are going to add all the values of array into the Set. Java program to find Maximum Consecutive Numbers.
If num1 1 num2 and num2 1 num3.
Consecutive true Shift numbers left. Then loop and multiply the result by the loop counter. Check if there exist any sequence. If Sum N this means consecutive.