Complete the longestRun method as described. Given an array of ints, determine the length of the longest “run” of values contained therein. A “run” is a group of identical values that are adjacent to each other in the array.
You should look at each element in the list in order.
Then check if the element continues a run.
If it does, the current run you’re looking at is one longer.
If it doesn’t, you’re starting a new run. What will you need to remember at this point? How will you remember that?
… try working out how you, as a person, would solve this problem. Come up with a list of steps that you can explain. Then write code that does those steps.