Write a method called hasTwoConsecutive that returns whether or not a list of integers has two adjacent numbers that are consecutive integers (true if such a pair exists and false otherwise). For example, if a variable list stores the values [1, 18, 2, 7, 8, 39, 18, 40], then the call list.hasTwoConsecutive( ) should return true because the list contains the adjacent numbers (7, 8), which are a pair of consecutive numbers.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.