write a program to input an array of n elements and find the frequency of the number that is yo be searched
Answers
Answered by
2
Answer:
Run an inner loop from i + 1 to size . The loop structure should look like for(j = i + 1; j < N; j++) . Inside inner loop, if duplicate element is found increment the frequency count of current array element. Which is if(arr[i] == arr[j]) then count++ .
Similar questions
Social Sciences,
3 months ago
Math,
3 months ago
English,
6 months ago
Geography,
6 months ago
Math,
10 months ago
Math,
10 months ago
Social Sciences,
10 months ago