Question: Write a function in Java that will count the number of streaks of consecutive numbers in an array of integers. For example countStreaks ( [
Write a function in Java that will count the number of "streaks" of consecutive numbers in an array of integers.
For example
countStreaks should return because there of the streak of s and the streak of s
countStreaks should return because there is a single streak of s
countStreaks should return because there is no streak of consecutive same numbers.
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
