Question: Write a method longestepquential sequence that returns the length of the longest sequential sequence within a list of integers. For example, if a variable called
Write a method longestepquential sequence that returns the length of the longest
sequential sequence within a list of integers. For example, if a variable
called list stores the following sequence of values:
then the call: longestsequentialsequenoe would return the value because
it is the length of the longest sequential sequence within this list the sequence
If the list is empty, your method should return Notice that for a non
empty list the method will always return a value of at least because any
individual element constitutes a sequential sequence.
Assume you are adding to the arrayIntList class with following fields:
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
