Question: Task 1 : longestSeq ( ) java Write a method named longestSeq that takes as a parameter an array of integers. The method should return
Task : longestSeq java
Write a method named longestSeq that takes as a parameter an array of integers. The method
should return the length of the longest consecutive sequence of integers in the array. For example,
if the array has the following values: there are two consecutive
sequences The longest one is the second sequence; hence the method should
return If there are no consecutive sequences in the array, the method should return If the
array is empty, the return value is
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
