Question: Given an array; write a function to find out the repeating number with the longest count. You can use the below code and fill the
Given an array; write a function to find out the repeating number with the longest count. You can use the below code and fill the code for the function "computeLongestSequence" . Your program should output something like:
Longest repeating number is:1 with count:1
Longest repeating number is:3 with count:4 Longest repeating number is:3 with count:4 Longest repeating number is:3 with count:10
The above statements will be written inside the function "computeLongestSequence" .
The first line could have the number 1 or some other number also depending on your code as the first array has all different elements.
#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
